Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): Update auth-server api docs (support 3.11.0) #4910

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions chaoscenter/authentication/api/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,40 @@ const docTemplate = `{
}
}
},
"/delete_project/{project_id}": {
"post": {
"description": "Delete a project.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ProjectRouter"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.ErrProjectNotFound"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrServerError"
}
}
}
}
},
"/dex/callback": {
"get": {
"description": "DexRouter creates all the required routes for OAuth purposes. .",
Expand Down Expand Up @@ -364,6 +398,44 @@ const docTemplate = `{
}
}
},
"/get_project_owners/:project_id/:state": {
"get": {
"description": "Return list of active project owners.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ProjectRouter"
],
"summary": "Get active project Owners.",
"parameters": [
{
"type": "string",
"description": "State",
"name": "state",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrServerError"
}
}
}
}
},
"/get_project_role/:project_id": {
"get": {
"description": "Return role of a project.",
Expand Down Expand Up @@ -628,6 +700,12 @@ const docTemplate = `{
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.ErrUserDeactivated"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.ErrInvalidCredentials"
}
Expand Down Expand Up @@ -1023,6 +1101,47 @@ const docTemplate = `{
}
}
},
"/update_member_role": {
"post": {
"description": "Return updated member role.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ProjectRouter"
],
"summary": "Update member role.",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.ErrInvalidRequest"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.ErrUnauthorized"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrServerError"
}
}
}
}
},
"/update_project_name": {
"post": {
"description": "Return updated project name.",
Expand Down
119 changes: 119 additions & 0 deletions chaoscenter/authentication/api/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,40 @@
}
}
},
"/delete_project/{project_id}": {
"post": {
"description": "Delete a project.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ProjectRouter"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.ErrProjectNotFound"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrServerError"
}
}
}
}
},
"/dex/callback": {
"get": {
"description": "DexRouter creates all the required routes for OAuth purposes. .",
Expand Down Expand Up @@ -354,6 +388,44 @@
}
}
},
"/get_project_owners/:project_id/:state": {
"get": {
"description": "Return list of active project owners.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ProjectRouter"
],
"summary": "Get active project Owners.",
"parameters": [
{
"type": "string",
"description": "State",
"name": "state",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrServerError"
}
}
}
}
},
"/get_project_role/:project_id": {
"get": {
"description": "Return role of a project.",
Expand Down Expand Up @@ -618,6 +690,12 @@
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.ErrUserDeactivated"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.ErrInvalidCredentials"
}
Expand Down Expand Up @@ -1013,6 +1091,47 @@
}
}
},
"/update_member_role": {
"post": {
"description": "Return updated member role.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ProjectRouter"
],
"summary": "Update member role.",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.ErrInvalidRequest"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.ErrUnauthorized"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrServerError"
}
}
}
}
},
"/update_project_name": {
"post": {
"description": "Return updated project name.",
Expand Down
78 changes: 78 additions & 0 deletions chaoscenter/authentication/api/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,28 @@ paths:
summary: Decline invitation.
tags:
- ProjectRouter
/delete_project/{project_id}:
post:
consumes:
- application/json
description: Delete a project.
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrProjectNotFound'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrServerError'
tags:
- ProjectRouter
/dex/callback:
get:
consumes:
Expand Down Expand Up @@ -406,6 +428,31 @@ paths:
summary: Get active project members.
tags:
- ProjectRouter
/get_project_owners/:project_id/:state:
get:
consumes:
- application/json
description: Return list of active project owners.
parameters:
- description: State
in: path
name: state
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrServerError'
summary: Get active project Owners.
tags:
- ProjectRouter
/get_project_role/:project_id:
get:
consumes:
Expand Down Expand Up @@ -579,6 +626,10 @@ paths:
$ref: '#/definitions/response.LoginResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrUserDeactivated'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/response.ErrInvalidCredentials'
"500":
Expand Down Expand Up @@ -836,6 +887,33 @@ paths:
$ref: '#/definitions/response.ErrUnauthorized'
tags:
- UserRouter
/update_member_role:
post:
consumes:
- application/json
description: Return updated member role.
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.ErrInvalidRequest'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/response.ErrUnauthorized'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrServerError'
summary: Update member role.
tags:
- ProjectRouter
/update_project_name:
post:
consumes:
Expand Down
Loading
Loading