diff options
Diffstat (limited to 'openapi/api-server.yaml')
| -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: |
