finish update openapi v2
This commit is contained in:
parent
73106daddd
commit
b0ed1bd6bc
@ -71,21 +71,19 @@ paths:
|
|||||||
summary: Retrieve a list of accounts
|
summary: Retrieve a list of accounts
|
||||||
security:
|
security:
|
||||||
- bearerAuth: []
|
- bearerAuth: []
|
||||||
parameters:
|
requestBody:
|
||||||
- name: limit
|
required: true
|
||||||
in: query
|
content:
|
||||||
description: The number of accounts to return
|
application/json:
|
||||||
required: false
|
schema:
|
||||||
schema:
|
type: object
|
||||||
type: integer
|
properties:
|
||||||
format: uint64
|
limit:
|
||||||
- name: page
|
type: integer
|
||||||
in: query
|
format: uint64
|
||||||
description: The page number of accounts to retrieve
|
page:
|
||||||
required: false
|
type: integer
|
||||||
schema:
|
format: uint64
|
||||||
type: integer
|
|
||||||
format: uint64
|
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successfully retrieved list of accounts
|
description: Successfully retrieved list of accounts
|
||||||
@ -112,12 +110,15 @@ paths:
|
|||||||
get:
|
get:
|
||||||
tags: [Account]
|
tags: [Account]
|
||||||
summary: Get privileges by user ID
|
summary: Get privileges by user ID
|
||||||
parameters:
|
requestBody:
|
||||||
- name: userId
|
required: true
|
||||||
in: path
|
content:
|
||||||
required: true
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: object
|
||||||
|
properties:
|
||||||
|
userId:
|
||||||
|
type: string
|
||||||
security:
|
security:
|
||||||
- bearerAuth: []
|
- bearerAuth: []
|
||||||
responses:
|
responses:
|
||||||
@ -140,12 +141,15 @@ paths:
|
|||||||
delete:
|
delete:
|
||||||
tags: [Account]
|
tags: [Account]
|
||||||
summary: Delete account by user ID
|
summary: Delete account by user ID
|
||||||
parameters:
|
requestBody:
|
||||||
- name: userId
|
required: true
|
||||||
in: path
|
content:
|
||||||
required: true
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: object
|
||||||
|
properties:
|
||||||
|
userId:
|
||||||
|
type: string
|
||||||
security:
|
security:
|
||||||
- bearerAuth: []
|
- bearerAuth: []
|
||||||
responses:
|
responses:
|
||||||
@ -353,6 +357,8 @@ paths:
|
|||||||
$ref: '#/components/responses/BadRequestError'
|
$ref: '#/components/responses/BadRequestError'
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
'406':
|
||||||
|
$ref: '#/components/responses/StatusNotAcceptableError'
|
||||||
'422':
|
'422':
|
||||||
description: Validation error
|
description: Validation error
|
||||||
content:
|
content:
|
||||||
@ -362,6 +368,8 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
message:
|
message:
|
||||||
type: string
|
type: string
|
||||||
|
'424':
|
||||||
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
@ -388,11 +396,13 @@ paths:
|
|||||||
$ref: '#/components/responses/BadRequestError'
|
$ref: '#/components/responses/BadRequestError'
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
'406':
|
||||||
|
$ref: '#/components/responses/StatusNotAcceptableError'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
/question/update:
|
/question/edit:
|
||||||
post:
|
patch:
|
||||||
tags: [Question]
|
tags: [Question]
|
||||||
summary: Update an existing question
|
summary: Update an existing question
|
||||||
security:
|
security:
|
||||||
@ -414,6 +424,8 @@ paths:
|
|||||||
$ref: '#/components/responses/BadRequestError'
|
$ref: '#/components/responses/BadRequestError'
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
'406':
|
||||||
|
$ref: '#/components/responses/StatusNotAcceptableError'
|
||||||
'422':
|
'422':
|
||||||
description: Validation error
|
description: Validation error
|
||||||
content:
|
content:
|
||||||
@ -423,6 +435,8 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
message:
|
message:
|
||||||
type: string
|
type: string
|
||||||
|
'424':
|
||||||
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
@ -449,6 +463,8 @@ paths:
|
|||||||
$ref: '#/components/responses/BadRequestError'
|
$ref: '#/components/responses/BadRequestError'
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
'424':
|
||||||
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
@ -478,6 +494,8 @@ paths:
|
|||||||
$ref: '#/components/responses/BadRequestError'
|
$ref: '#/components/responses/BadRequestError'
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
'424':
|
||||||
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
@ -504,6 +522,8 @@ paths:
|
|||||||
$ref: '#/components/responses/BadRequestError'
|
$ref: '#/components/responses/BadRequestError'
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
'424':
|
||||||
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
@ -530,6 +550,10 @@ paths:
|
|||||||
$ref: '#/components/responses/BadRequestError'
|
$ref: '#/components/responses/BadRequestError'
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
'406':
|
||||||
|
$ref: '#/components/responses/StatusNotAcceptableError'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/StatusConflictError'
|
||||||
'422':
|
'422':
|
||||||
description: Validation error
|
description: Validation error
|
||||||
content:
|
content:
|
||||||
@ -542,7 +566,7 @@ paths:
|
|||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
/quiz/list:
|
/quiz/getList:
|
||||||
post:
|
post:
|
||||||
tags: [Quiz]
|
tags: [Quiz]
|
||||||
summary: Get a paginated list of quizzes
|
summary: Get a paginated list of quizzes
|
||||||
@ -565,11 +589,13 @@ paths:
|
|||||||
$ref: '#/components/responses/BadRequestError'
|
$ref: '#/components/responses/BadRequestError'
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
'406':
|
||||||
|
$ref: '#/components/responses/StatusNotAcceptableError'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
/quiz/update:
|
/quiz/edit:
|
||||||
post:
|
patch:
|
||||||
tags: [Quiz]
|
tags: [Quiz]
|
||||||
summary: Update an existing quiz
|
summary: Update an existing quiz
|
||||||
security:
|
security:
|
||||||
@ -591,6 +617,10 @@ paths:
|
|||||||
$ref: '#/components/responses/BadRequestError'
|
$ref: '#/components/responses/BadRequestError'
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
'406':
|
||||||
|
$ref: '#/components/responses/StatusNotAcceptableError'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/StatusConflictError'
|
||||||
'422':
|
'422':
|
||||||
description: Validation error
|
description: Validation error
|
||||||
content:
|
content:
|
||||||
@ -600,6 +630,8 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
message:
|
message:
|
||||||
type: string
|
type: string
|
||||||
|
'424':
|
||||||
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
@ -626,6 +658,8 @@ paths:
|
|||||||
$ref: '#/components/responses/BadRequestError'
|
$ref: '#/components/responses/BadRequestError'
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
'424':
|
||||||
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
@ -655,11 +689,13 @@ paths:
|
|||||||
$ref: '#/components/responses/BadRequestError'
|
$ref: '#/components/responses/BadRequestError'
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
'424':
|
||||||
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
/quiz/delete:
|
/quiz/delete:
|
||||||
post:
|
delete:
|
||||||
tags: [Quiz]
|
tags: [Quiz]
|
||||||
summary: Delete a quiz
|
summary: Delete a quiz
|
||||||
security:
|
security:
|
||||||
@ -681,11 +717,13 @@ paths:
|
|||||||
$ref: '#/components/responses/BadRequestError'
|
$ref: '#/components/responses/BadRequestError'
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
'424':
|
||||||
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
/quiz/archive:
|
/quiz/archive:
|
||||||
post:
|
patch:
|
||||||
tags: [Quiz]
|
tags: [Quiz]
|
||||||
summary: Archive a quiz
|
summary: Archive a quiz
|
||||||
security:
|
security:
|
||||||
@ -707,6 +745,8 @@ paths:
|
|||||||
$ref: '#/components/responses/BadRequestError'
|
$ref: '#/components/responses/BadRequestError'
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
'424':
|
||||||
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
@ -732,7 +772,7 @@ paths:
|
|||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
/quiz/template/copy:
|
/quiz/template:
|
||||||
post:
|
post:
|
||||||
tags: [Quiz]
|
tags: [Quiz]
|
||||||
summary: Create a copy of a quiz template
|
summary: Create a copy of a quiz template
|
||||||
@ -744,7 +784,11 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Quiz'
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
'500':
|
'500':
|
||||||
@ -804,8 +848,8 @@ paths:
|
|||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
/results/status:
|
/result/seen:
|
||||||
post:
|
patch:
|
||||||
tags: [Result]
|
tags: [Result]
|
||||||
summary: Update status of multiple results
|
summary: Update status of multiple results
|
||||||
security:
|
security:
|
||||||
@ -828,7 +872,7 @@ paths:
|
|||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
/results/export/{quizID}:
|
/results/{quizID}/export:
|
||||||
post:
|
post:
|
||||||
tags: [Result]
|
tags: [Result]
|
||||||
summary: Export quiz results to Excel
|
summary: Export quiz results to Excel
|
||||||
@ -863,7 +907,7 @@ paths:
|
|||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
/results/answers/{resultID}:
|
/result/{resultID}:
|
||||||
get:
|
get:
|
||||||
tags: [Result]
|
tags: [Result]
|
||||||
summary: Get answers for a specific result
|
summary: Get answers for a specific result
|
||||||
@ -1026,18 +1070,12 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
- name: from
|
requestBody:
|
||||||
in: query
|
required: true
|
||||||
required: true
|
content:
|
||||||
schema:
|
application/json:
|
||||||
type: integer
|
schema:
|
||||||
format: uint64
|
$ref: '#/components/schemas/DeviceStatRequest'
|
||||||
- name: to
|
|
||||||
in: query
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
format: uint64
|
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successfully retrieved pipeline statistics
|
description: Successfully retrieved pipeline statistics
|
||||||
@ -1151,7 +1189,6 @@ paths:
|
|||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalServerError'
|
$ref: '#/components/responses/InternalServerError'
|
||||||
|
|
||||||
# -------------------------------
|
|
||||||
components:
|
components:
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
bearerAuth:
|
bearerAuth:
|
||||||
@ -1243,6 +1280,49 @@ components:
|
|||||||
code:
|
code:
|
||||||
type: integer
|
type: integer
|
||||||
example: 208
|
example: 208
|
||||||
|
StatusNotAcceptableError:
|
||||||
|
description: Status not acceptable – requested format not supported
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
error:
|
||||||
|
type: string
|
||||||
|
example: "Requested format not acceptable"
|
||||||
|
code:
|
||||||
|
type: integer
|
||||||
|
example: 406
|
||||||
|
|
||||||
|
StatusFailedDependencyError:
|
||||||
|
description: Failed dependency – a prerequisite condition failed
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
error:
|
||||||
|
type: string
|
||||||
|
example: "A prerequisite condition failed"
|
||||||
|
code:
|
||||||
|
type: integer
|
||||||
|
example: 424
|
||||||
|
|
||||||
|
StatusConflictError:
|
||||||
|
description: Conflict – request could not be completed due to conflict with current state
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
error:
|
||||||
|
type: string
|
||||||
|
example: "Conflict with current state"
|
||||||
|
code:
|
||||||
|
type: integer
|
||||||
|
example: 409
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
schemas:
|
schemas:
|
||||||
Account:
|
Account:
|
||||||
@ -1881,10 +1961,10 @@ components:
|
|||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
Count:
|
count:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
QuestionID:
|
questionID:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user