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 /contests/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' delete: operationId: DeleteTask security: - bearerAuth: [ ] parameters: - name: task_id in: query required: true schema: type: integer format: int32 responses: "200": description: OK /contests/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 components: schemas: Problem: type: object required: - id - title - legend - input_format - output_format - notes - tutorial - latex_summary - time_limit - memory_limit - created_at - updated_at properties: id: type: integer format: int32 title: type: string legend: type: string input_format: type: string output_format: type: string notes: type: string tutorial: type: string latex_summary: type: string time_limit: type: integer format: int32 memory_limit: type: integer format: int32 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 tutorial: 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 securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT