feat(tester): add endpoints
add GetMonitor&GetTask endpoints
This commit is contained in:
parent
6a83a9832d
commit
bf3233f7b8
1 changed files with 181 additions and 2 deletions
|
@ -208,13 +208,32 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/AddTaskResponse'
|
$ref: '#/components/schemas/AddTaskResponse'
|
||||||
|
/tasks/{id}:
|
||||||
|
get:
|
||||||
|
operationId: GetTask
|
||||||
|
security:
|
||||||
|
- bearerAuth: [ ]
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/GetTaskResponse'
|
||||||
delete:
|
delete:
|
||||||
operationId: DeleteTask
|
operationId: DeleteTask
|
||||||
security:
|
security:
|
||||||
- bearerAuth: [ ]
|
- bearerAuth: [ ]
|
||||||
parameters:
|
parameters:
|
||||||
- name: task_id
|
- name: id
|
||||||
in: query
|
in: path
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
|
@ -415,6 +434,25 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/GetSolutionResponse'
|
$ref: '#/components/schemas/GetSolutionResponse'
|
||||||
|
/monitor:
|
||||||
|
get:
|
||||||
|
operationId: GetMonitor
|
||||||
|
security:
|
||||||
|
- bearerAuth: [ ]
|
||||||
|
parameters:
|
||||||
|
- name: contest_id
|
||||||
|
in: query
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/GetMonitorResponse'
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
Problem:
|
Problem:
|
||||||
|
@ -923,6 +961,147 @@ components:
|
||||||
properties:
|
properties:
|
||||||
solution:
|
solution:
|
||||||
$ref: '#/components/schemas/Solution'
|
$ref: '#/components/schemas/Solution'
|
||||||
|
Task:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
- position
|
||||||
|
- title
|
||||||
|
- time_limit
|
||||||
|
- memory_limit
|
||||||
|
|
||||||
|
- legend_html
|
||||||
|
- input_format_html
|
||||||
|
- output_format_html
|
||||||
|
- notes_html
|
||||||
|
- scoring_html
|
||||||
|
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
position:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
time_limit:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
memory_limit:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
|
||||||
|
legend_html:
|
||||||
|
type: string
|
||||||
|
input_format_html:
|
||||||
|
type: string
|
||||||
|
output_format_html:
|
||||||
|
type: string
|
||||||
|
notes_html:
|
||||||
|
type: string
|
||||||
|
scoring_html:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
GetTaskResponse:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- task
|
||||||
|
- contest
|
||||||
|
properties:
|
||||||
|
contest:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
- title
|
||||||
|
- tasks
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
tasks:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/RichTask'
|
||||||
|
task:
|
||||||
|
$ref: '#/components/schemas/Task'
|
||||||
|
GetMonitorResponse:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- contest
|
||||||
|
- participants
|
||||||
|
- summary_per_problem
|
||||||
|
properties:
|
||||||
|
contest:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
- title
|
||||||
|
- tasks
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
tasks:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/RichTask'
|
||||||
|
participants:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
- name
|
||||||
|
- solved_in_total
|
||||||
|
- penalty_in_total
|
||||||
|
- solutions
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
solved_in_total:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
penalty_in_total:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
solutions:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/SolutionListItem'
|
||||||
|
summary_per_problem:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
- success
|
||||||
|
- total
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
success:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
total:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
bearerAuth:
|
bearerAuth:
|
||||||
type: http
|
type: http
|
||||||
|
|
Loading…
Add table
Reference in a new issue