Skip to content

Commit fdd26a6

Browse files
type(docs): Updated Auth API docs to v3.9.1 (litmuschaos#4771)
Signed-off-by: Suyeon Jung <[email protected]>
1 parent a2bfdcb commit fdd26a6

File tree

4 files changed

+1358
-1488
lines changed

4 files changed

+1358
-1488
lines changed

chaoscenter/authentication/api/docs/docs.go

+113
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,40 @@ const docTemplate = `{
229229
}
230230
}
231231
},
232+
"/delete_project/{project_id}": {
233+
"post": {
234+
"description": "Delete a project.",
235+
"consumes": [
236+
"application/json"
237+
],
238+
"produces": [
239+
"application/json"
240+
],
241+
"tags": [
242+
"ProjectRouter"
243+
],
244+
"responses": {
245+
"200": {
246+
"description": "OK",
247+
"schema": {
248+
"$ref": "#/definitions/response.Response"
249+
}
250+
},
251+
"400": {
252+
"description": "Bad Request",
253+
"schema": {
254+
"$ref": "#/definitions/response.ErrProjectNotFound"
255+
}
256+
},
257+
"500": {
258+
"description": "Internal Server Error",
259+
"schema": {
260+
"$ref": "#/definitions/response.ErrServerError"
261+
}
262+
}
263+
}
264+
}
265+
},
232266
"/dex/callback": {
233267
"get": {
234268
"description": "DexRouter creates all the required routes for OAuth purposes. .",
@@ -364,6 +398,44 @@ const docTemplate = `{
364398
}
365399
}
366400
},
401+
"/get_project_owners/:project_id/:state": {
402+
"get": {
403+
"description": "Return list of active project owners.",
404+
"consumes": [
405+
"application/json"
406+
],
407+
"produces": [
408+
"application/json"
409+
],
410+
"tags": [
411+
"ProjectRouter"
412+
],
413+
"summary": "Get active project Owners.",
414+
"parameters": [
415+
{
416+
"type": "string",
417+
"description": "State",
418+
"name": "state",
419+
"in": "path",
420+
"required": true
421+
}
422+
],
423+
"responses": {
424+
"200": {
425+
"description": "OK",
426+
"schema": {
427+
"$ref": "#/definitions/response.Response"
428+
}
429+
},
430+
"500": {
431+
"description": "Internal Server Error",
432+
"schema": {
433+
"$ref": "#/definitions/response.ErrServerError"
434+
}
435+
}
436+
}
437+
}
438+
},
367439
"/get_project_role/:project_id": {
368440
"get": {
369441
"description": "Return role of a project.",
@@ -1023,6 +1095,47 @@ const docTemplate = `{
10231095
}
10241096
}
10251097
},
1098+
"/update_member_role": {
1099+
"post": {
1100+
"description": "Return updated member role.",
1101+
"consumes": [
1102+
"application/json"
1103+
],
1104+
"produces": [
1105+
"application/json"
1106+
],
1107+
"tags": [
1108+
"ProjectRouter"
1109+
],
1110+
"summary": "Update member role.",
1111+
"responses": {
1112+
"200": {
1113+
"description": "OK",
1114+
"schema": {
1115+
"$ref": "#/definitions/response.Response"
1116+
}
1117+
},
1118+
"400": {
1119+
"description": "Bad Request",
1120+
"schema": {
1121+
"$ref": "#/definitions/response.ErrInvalidRequest"
1122+
}
1123+
},
1124+
"401": {
1125+
"description": "Unauthorized",
1126+
"schema": {
1127+
"$ref": "#/definitions/response.ErrUnauthorized"
1128+
}
1129+
},
1130+
"500": {
1131+
"description": "Internal Server Error",
1132+
"schema": {
1133+
"$ref": "#/definitions/response.ErrServerError"
1134+
}
1135+
}
1136+
}
1137+
}
1138+
},
10261139
"/update_project_name": {
10271140
"post": {
10281141
"description": "Return updated project name.",

chaoscenter/authentication/api/docs/swagger.json

+121-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
{
22
"swagger": "2.0",
3+
"host": "localhost:3000",
4+
"schemes": [
5+
"https",
6+
"http"
7+
],
38
"info": {
4-
"title": "Chaoscenter API documentation",
5-
"contact": {}
9+
"title": "Litmus Portal Authentication API",
10+
"version": "3.9.1",
11+
"description": "Litmus Portal Authentication APIs are used to authenticate the identity of a user and to perform several user-specific tasks like:\n <li>Update Profile</li>\n <li>Change Password</li>\n <li>Reset Password</li>\n <li>Create new users etc.</li>\n"
612
},
713
"paths": {
814
"/accept_invitation": {
@@ -219,6 +225,40 @@
219225
}
220226
}
221227
},
228+
"/delete_project/{project_id}": {
229+
"post": {
230+
"description": "Delete a project.",
231+
"consumes": [
232+
"application/json"
233+
],
234+
"produces": [
235+
"application/json"
236+
],
237+
"tags": [
238+
"ProjectRouter"
239+
],
240+
"responses": {
241+
"200": {
242+
"description": "OK",
243+
"schema": {
244+
"$ref": "#/definitions/response.Response"
245+
}
246+
},
247+
"400": {
248+
"description": "Bad Request",
249+
"schema": {
250+
"$ref": "#/definitions/response.ErrProjectNotFound"
251+
}
252+
},
253+
"500": {
254+
"description": "Internal Server Error",
255+
"schema": {
256+
"$ref": "#/definitions/response.ErrServerError"
257+
}
258+
}
259+
}
260+
}
261+
},
222262
"/dex/callback": {
223263
"get": {
224264
"description": "DexRouter creates all the required routes for OAuth purposes. .",
@@ -354,6 +394,44 @@
354394
}
355395
}
356396
},
397+
"/get_project_owners/:project_id/:state": {
398+
"get": {
399+
"description": "Return list of active project owners.",
400+
"consumes": [
401+
"application/json"
402+
],
403+
"produces": [
404+
"application/json"
405+
],
406+
"tags": [
407+
"ProjectRouter"
408+
],
409+
"summary": "Get active project Owners.",
410+
"parameters": [
411+
{
412+
"type": "string",
413+
"description": "State",
414+
"name": "state",
415+
"in": "path",
416+
"required": true
417+
}
418+
],
419+
"responses": {
420+
"200": {
421+
"description": "OK",
422+
"schema": {
423+
"$ref": "#/definitions/response.Response"
424+
}
425+
},
426+
"500": {
427+
"description": "Internal Server Error",
428+
"schema": {
429+
"$ref": "#/definitions/response.ErrServerError"
430+
}
431+
}
432+
}
433+
}
434+
},
357435
"/get_project_role/:project_id": {
358436
"get": {
359437
"description": "Return role of a project.",
@@ -1013,6 +1091,47 @@
10131091
}
10141092
}
10151093
},
1094+
"/update_member_role": {
1095+
"post": {
1096+
"description": "Return updated member role.",
1097+
"consumes": [
1098+
"application/json"
1099+
],
1100+
"produces": [
1101+
"application/json"
1102+
],
1103+
"tags": [
1104+
"ProjectRouter"
1105+
],
1106+
"summary": "Update member role.",
1107+
"responses": {
1108+
"200": {
1109+
"description": "OK",
1110+
"schema": {
1111+
"$ref": "#/definitions/response.Response"
1112+
}
1113+
},
1114+
"400": {
1115+
"description": "Bad Request",
1116+
"schema": {
1117+
"$ref": "#/definitions/response.ErrInvalidRequest"
1118+
}
1119+
},
1120+
"401": {
1121+
"description": "Unauthorized",
1122+
"schema": {
1123+
"$ref": "#/definitions/response.ErrUnauthorized"
1124+
}
1125+
},
1126+
"500": {
1127+
"description": "Internal Server Error",
1128+
"schema": {
1129+
"$ref": "#/definitions/response.ErrServerError"
1130+
}
1131+
}
1132+
}
1133+
}
1134+
},
10161135
"/update_project_name": {
10171136
"post": {
10181137
"description": "Return updated project name.",

chaoscenter/authentication/api/docs/swagger.yaml

+74
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,28 @@ paths:
318318
summary: Decline invitation.
319319
tags:
320320
- ProjectRouter
321+
/delete_project/{project_id}:
322+
post:
323+
consumes:
324+
- application/json
325+
description: Delete a project.
326+
produces:
327+
- application/json
328+
responses:
329+
"200":
330+
description: OK
331+
schema:
332+
$ref: '#/definitions/response.Response'
333+
"400":
334+
description: Bad Request
335+
schema:
336+
$ref: '#/definitions/response.ErrProjectNotFound'
337+
"500":
338+
description: Internal Server Error
339+
schema:
340+
$ref: '#/definitions/response.ErrServerError'
341+
tags:
342+
- ProjectRouter
321343
/dex/callback:
322344
get:
323345
consumes:
@@ -406,6 +428,31 @@ paths:
406428
summary: Get active project members.
407429
tags:
408430
- ProjectRouter
431+
/get_project_owners/:project_id/:state:
432+
get:
433+
consumes:
434+
- application/json
435+
description: Return list of active project owners.
436+
parameters:
437+
- description: State
438+
in: path
439+
name: state
440+
required: true
441+
type: string
442+
produces:
443+
- application/json
444+
responses:
445+
"200":
446+
description: OK
447+
schema:
448+
$ref: '#/definitions/response.Response'
449+
"500":
450+
description: Internal Server Error
451+
schema:
452+
$ref: '#/definitions/response.ErrServerError'
453+
summary: Get active project Owners.
454+
tags:
455+
- ProjectRouter
409456
/get_project_role/:project_id:
410457
get:
411458
consumes:
@@ -836,6 +883,33 @@ paths:
836883
$ref: '#/definitions/response.ErrUnauthorized'
837884
tags:
838885
- UserRouter
886+
/update_member_role:
887+
post:
888+
consumes:
889+
- application/json
890+
description: Return updated member role.
891+
produces:
892+
- application/json
893+
responses:
894+
"200":
895+
description: OK
896+
schema:
897+
$ref: '#/definitions/response.Response'
898+
"400":
899+
description: Bad Request
900+
schema:
901+
$ref: '#/definitions/response.ErrInvalidRequest'
902+
"401":
903+
description: Unauthorized
904+
schema:
905+
$ref: '#/definitions/response.ErrUnauthorized'
906+
"500":
907+
description: Internal Server Error
908+
schema:
909+
$ref: '#/definitions/response.ErrServerError'
910+
summary: Update member role.
911+
tags:
912+
- ProjectRouter
839913
/update_project_name:
840914
post:
841915
consumes:

0 commit comments

Comments
 (0)