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

type(docs): Update GraphQL document (support 3.9.2) #4791

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
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
113 changes: 113 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 @@ -1023,6 +1095,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
123 changes: 121 additions & 2 deletions chaoscenter/authentication/api/docs/swagger.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"swagger": "2.0",
"host": "localhost:3000",
"schemes": [
"https",
"http"
],
"info": {
"title": "Chaoscenter API documentation",
"contact": {}
"title": "Litmus Portal Authentication API",
"version": "3.9.1",
"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"
},
"paths": {
"/accept_invitation": {
Expand Down Expand Up @@ -219,6 +225,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 +394,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 @@ -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
74 changes: 74 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 @@ -836,6 +883,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