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