refactor(user,session): refactor api

This commit is contained in:
Vyacheslav1557 2025-03-28 20:31:26 +05:00
parent 564f3fe0c9
commit 9c69ced34b

View file

@ -640,51 +640,7 @@ components:
id: id:
type: integer type: integer
format: int32 format: int32
BestSolution: TasksListItem:
type: object
required:
- id
- task_id
- participant_id
- state
- score
- penalty
- total_score
- language
- created_at
- updated_at
properties:
id:
type: integer
format: int32
task_id:
type: integer
format: int32
participant_id:
type: integer
format: int32
state:
type: integer
format: int32
score:
type: integer
format: int32
penalty:
type: integer
format: int32
total_score:
type: integer
format: int32
language:
type: integer
format: int32
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
RichTask:
type: object type: object
required: required:
- id - id
@ -733,12 +689,12 @@ components:
type: object type: object
required: required:
- task - task
- best_solution - solution
properties: properties:
task: task:
$ref: '#/components/schemas/RichTask' $ref: '#/components/schemas/TasksListItem'
best_solution: solution:
$ref: '#/components/schemas/BestSolution' $ref: '#/components/schemas/Solution'
AddParticipantResponse: AddParticipantResponse:
type: object type: object
required: required:
@ -852,14 +808,14 @@ components:
solutions: solutions:
type: array type: array
items: items:
$ref: '#/components/schemas/SolutionListItem' $ref: '#/components/schemas/SolutionsListItem'
page: page:
type: integer type: integer
format: int32 format: int32
max_page: max_page:
type: integer type: integer
format: int32 format: int32
SolutionListItem: SolutionsListItem:
type: object type: object
required: required:
- id - id
@ -1032,7 +988,7 @@ components:
tasks: tasks:
type: array type: array
items: items:
$ref: '#/components/schemas/RichTask' $ref: '#/components/schemas/TasksListItem'
task: task:
$ref: '#/components/schemas/Task' $ref: '#/components/schemas/Task'
GetMonitorResponse: GetMonitorResponse:
@ -1057,7 +1013,7 @@ components:
tasks: tasks:
type: array type: array
items: items:
$ref: '#/components/schemas/RichTask' $ref: '#/components/schemas/TasksListItem'
participants: participants:
type: array type: array
items: items:
@ -1083,7 +1039,7 @@ components:
solutions: solutions:
type: array type: array
items: items:
$ref: '#/components/schemas/SolutionListItem' $ref: '#/components/schemas/SolutionsListItem'
summary_per_problem: summary_per_problem:
type: array type: array
items: items: