openapi: 3.0.3 info: title: TesterService API version: 0.0.1 paths: /problems: get: operationId: ListProblems parameters: - name: page in: query required: true schema: type: integer format: int32 - name: pageSize in: query required: true schema: type: integer format: int32 security: - bearerAuth: [ ] responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/ListProblemsResponse' post: operationId: CreateProblem security: - bearerAuth: [ ] responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/CreateProblemResponse' /problems/{id}: get: operationId: GetProblem 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/GetProblemResponse' delete: operationId: DeleteProblem security: - bearerAuth: [ ] parameters: - name: id in: path required: true schema: type: integer format: int32 responses: "200": description: OK content: { } patch: operationId: UpdateProblem security: - bearerAuth: [ ] parameters: - name: id in: path required: true schema: type: integer format: int32 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateProblemRequest' responses: "200": description: OK content: { } /contests: get: operationId: ListContests parameters: - name: page in: query required: true schema: type: integer format: int32 - name: pageSize in: query required: true schema: type: integer format: int32 security: - bearerAuth: [ ] responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/ListContestsResponse' post: operationId: CreateContest security: - bearerAuth: [ ] responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/CreateContestResponse' /contests/{id}: get: operationId: GetContest 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/GetContestResponse' delete: operationId: DeleteContest security: - bearerAuth: [ ] parameters: - name: id in: path required: true schema: type: integer format: int32 responses: "200": description: OK patch: operationId: UpdateContest security: - bearerAuth: [ ] parameters: - name: id in: path required: true schema: type: integer format: int32 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateContestRequest' responses: "200": description: OK /tasks: post: operationId: AddTask security: - bearerAuth: [ ] parameters: - name: contest_id in: query required: true schema: type: integer format: int32 - name: problem_id in: query required: true schema: type: integer format: int32 responses: "200": description: OK content: application/json: schema: $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: operationId: DeleteTask security: - bearerAuth: [ ] parameters: - name: id in: path required: true schema: type: integer format: int32 responses: "200": description: OK /participants: get: operationId: ListParticipants security: - bearerAuth: [ ] parameters: - name: contest_id in: query required: true schema: type: integer format: int32 - name: page in: query required: true schema: type: integer format: int32 - name: pageSize in: query required: true schema: type: integer format: int32 responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/ListParticipantsResponse' post: operationId: AddParticipant security: - bearerAuth: [ ] parameters: - name: contest_id in: query required: true schema: type: integer format: int32 - name: user_id in: query required: true schema: type: integer format: int32 responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/AddParticipantResponse' delete: operationId: DeleteParticipant security: - bearerAuth: [ ] parameters: - name: participant_id in: query required: true schema: type: integer format: int32 responses: "200": description: OK patch: operationId: UpdateParticipant security: - bearerAuth: [ ] parameters: - name: participant_id in: query required: true schema: type: integer format: int32 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateParticipantRequest' responses: "200": description: OK /solutions: post: operationId: CreateSolution security: - bearerAuth: [ ] parameters: - name: task_id in: query required: true schema: type: integer format: int32 - name: language in: query required: true schema: type: integer format: int32 requestBody: required: true content: multipart/form-data: schema: $ref: '#/components/schemas/CreateSolutionRequest' responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/CreateSolutionResponse' get: operationId: ListSolutions security: - bearerAuth: [ ] parameters: - name: page in: query required: true schema: type: integer format: int32 - name: pageSize in: query required: true schema: type: integer format: int32 - name: contest_id in: query schema: type: integer format: int32 - name: participantId in: query schema: type: integer format: int32 - name: task_id in: query schema: type: integer format: int32 - name: state in: query schema: type: integer format: int32 - name: order in: query schema: type: integer format: int32 - name: language in: query schema: type: integer format: int32 responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/ListSolutionsResponse' /solutions/{id}: get: operationId: GetSolution 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/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: schemas: Problem: type: object required: - id - title - time_limit - memory_limit - legend - input_format - output_format - notes - scoring - legend_html - input_format_html - output_format_html - notes_html - scoring_html - created_at - updated_at properties: id: type: integer format: int32 title: type: string time_limit: type: integer format: int32 memory_limit: type: integer format: int32 legend: type: string input_format: type: string output_format: type: string notes: type: string scoring: type: string 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 ProblemListItem: type: object required: - id - title - memory_limit - time_limit - created_at - updated_at properties: id: type: integer format: int32 title: type: string memory_limit: type: integer format: int32 time_limit: type: integer format: int32 created_at: type: string format: date-time updated_at: type: string format: date-time ListProblemsResponse: type: object required: - problems - page - max_page properties: problems: type: array items: $ref: '#/components/schemas/ProblemListItem' page: type: integer format: int32 max_page: type: integer format: int32 CreateProblemResponse: type: object required: - id properties: id: type: integer format: int32 GetProblemResponse: type: object required: - problem properties: problem: $ref: '#/components/schemas/Problem' Contest: type: object required: - id - title - created_at - updated_at properties: id: type: integer format: int32 title: type: string created_at: type: string format: date-time updated_at: type: string format: date-time ContestsListItem: type: object required: - id - title - created_at - updated_at properties: id: type: integer format: int32 title: type: string created_at: type: string format: date-time updated_at: type: string format: date-time ListContestsResponse: type: object required: - contests - page - max_page properties: contests: type: array items: $ref: '#/components/schemas/ContestsListItem' page: type: integer format: int32 max_page: type: integer format: int32 CreateContestResponse: type: object required: - id properties: id: type: integer format: int32 BestSolution: 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 required: - id - problem_id - position - title - memory_limit - time_limit - created_at - updated_at properties: id: type: integer format: int32 problem_id: type: integer format: int32 position: type: integer format: int32 title: type: string memory_limit: type: integer format: int32 time_limit: type: integer format: int32 created_at: type: string format: date-time updated_at: type: string format: date-time GetContestResponse: type: object required: - contest - tasks properties: contest: $ref: '#/components/schemas/Contest' tasks: type: array items: type: object required: - task - best_solution properties: task: $ref: '#/components/schemas/RichTask' best_solution: $ref: '#/components/schemas/BestSolution' AddParticipantResponse: type: object required: - id properties: id: type: integer format: int32 AddTaskResponse: type: object required: - id properties: id: type: integer format: int32 ParticipantsListItem: type: object required: - id - name - user_id - created_at - updated_at properties: id: type: integer format: int32 name: type: string user_id: type: integer format: int32 created_at: type: string format: date-time updated_at: type: string format: date-time ListParticipantsResponse: type: object required: - participants - page - max_page properties: participants: type: array items: $ref: '#/components/schemas/ParticipantsListItem' page: type: integer format: int32 max_page: type: integer format: int32 UpdateProblemRequest: type: object properties: title: type: string legend: type: string input_format: type: string output_format: type: string notes: type: string scoring: type: string memory_limit: type: integer format: int32 time_limit: type: integer format: int32 UpdateContestRequest: type: object properties: title: type: string UpdateParticipantRequest: type: object properties: name: type: string CreateSolutionRequest: type: object required: - solution properties: solution: type: string format: binary CreateSolutionResponse: type: object required: - id properties: id: type: integer format: int32 ListSolutionsResponse: type: object required: - solutions - page - max_page properties: solutions: type: array items: $ref: '#/components/schemas/SolutionListItem' page: type: integer format: int32 max_page: type: integer format: int32 SolutionListItem: type: object required: - id - task_id - contest_id - participant_id - state - score - penalty - total_score - language - updated_at - created_at properties: id: type: integer format: int32 task_id: type: integer format: int32 contest_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 updated_at: type: string format: date-time created_at: type: string format: date-time Solution: type: object required: - id - task_id - participant_id - state - score - penalty - total_score - solution - language - updated_at - created_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 solution: type: string updated_at: type: string format: date-time created_at: type: string format: date-time GetSolutionResponse: type: object required: - solution properties: 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: bearerAuth: type: http scheme: bearer bearerFormat: JWT