diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-12 05:54:49 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-12 05:54:49 +0900 |
| commit | 3074f8d74330a2c238040755b758230d682a4bc4 (patch) | |
| tree | 3c45267ee25aa78be1ad4c31e0c09894e656b506 /openapi | |
| parent | 7527e54bba0c528015ce402bfa4534c1ab6ca1da (diff) | |
| parent | b37d6f213c2f3b19631e5067f39a7106859faaed (diff) | |
| download | phperkaigi-2025-albatross-3074f8d74330a2c238040755b758230d682a4bc4.tar.gz phperkaigi-2025-albatross-3074f8d74330a2c238040755b758230d682a4bc4.tar.zst phperkaigi-2025-albatross-3074f8d74330a2c238040755b758230d682a4bc4.zip | |
Merge branch 'feat/play-page'
Diffstat (limited to 'openapi')
| -rw-r--r-- | openapi/api-server.yaml | 62 |
1 files changed, 53 insertions, 9 deletions
diff --git a/openapi/api-server.yaml b/openapi/api-server.yaml index 826c4ba..94083d3 100644 --- a/openapi/api-server.yaml +++ b/openapi/api-server.yaml @@ -212,16 +212,17 @@ components: started_at: type: integer example: 946684800 + x-go-type: int64 problem: $ref: '#/components/schemas/Problem' players: type: array items: $ref: '#/components/schemas/User' - verification_steps: + exec_steps: type: array items: - $ref: '#/components/schemas/VerificationStep' + $ref: '#/components/schemas/ExecStep' required: - game_id - game_type @@ -230,8 +231,8 @@ components: - duration_seconds - problem - players - - verification_steps - VerificationStep: + - exec_steps + ExecStep: type: object properties: testcase_id: @@ -268,6 +269,7 @@ components: oneOf: - $ref: '#/components/schemas/GamePlayerMessageS2CStart' - $ref: '#/components/schemas/GamePlayerMessageS2CExecResult' + - $ref: '#/components/schemas/GamePlayerMessageS2CSubmitResult' GamePlayerMessageS2CStart: type: object properties: @@ -285,6 +287,7 @@ components: start_at: type: integer example: 946684800 + x-go-type: int64 required: - start_at GamePlayerMessageS2CExecResult: @@ -301,16 +304,55 @@ components: GamePlayerMessageS2CExecResultPayload: type: object properties: + testcase_id: + type: integer + nullable: true + example: 1 status: type: string example: "success" enum: - success - - failure + - wrong_answer - timeout + - runtime_error - internal_error - compile_error + stdout: + type: string + example: "Hello, world!" + stderr: + type: string + example: "" + required: + - testcase_id + - status + - stdout + - stderr + GamePlayerMessageS2CSubmitResult: + type: object + properties: + type: + type: string + const: "player:s2c:submitresult" + data: + $ref: '#/components/schemas/GamePlayerMessageS2CSubmitResultPayload' + required: + - type + - data + GamePlayerMessageS2CSubmitResultPayload: + type: object + properties: + status: + type: string + example: "success" + enum: + - success - wrong_answer + - timeout + - runtime_error + - internal_error + - compile_error score: type: integer nullable: true @@ -388,6 +430,7 @@ components: start_at: type: integer example: 946684800 + x-go-type: int64 required: - start_at GameWatcherMessageS2CCode: @@ -430,12 +473,8 @@ components: player_id: type: integer example: 1 - preliminary_score: - type: integer - example: 100 required: - player_id - - preliminary_score GameWatcherMessageS2CExecResult: type: object properties: @@ -506,8 +545,13 @@ components: - runtime_error - internal_error - compile_error + score: + type: integer + nullable: true + example: 100 required: - player_id - status + - score # GameWatcherMessageC2S: # oneOf: |
