diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-07-29 03:44:10 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-07-29 19:38:39 +0900 |
| commit | d73fd8bf5bf589a4a391c867e980761fadb647ce (patch) | |
| tree | 15f2454b48cae461a6d8acc7edb2c2111d445d3e /openapi.yaml | |
| parent | 3f95e0e6d62267cf8863e98f3ab7de8971a91000 (diff) | |
| download | iosdc-japan-2024-albatross-d73fd8bf5bf589a4a391c867e980761fadb647ce.tar.gz iosdc-japan-2024-albatross-d73fd8bf5bf589a4a391c867e980761fadb647ce.tar.zst iosdc-japan-2024-albatross-d73fd8bf5bf589a4a391c867e980761fadb647ce.zip | |
feat: partially implement watching
Diffstat (limited to 'openapi.yaml')
| -rw-r--r-- | openapi.yaml | 95 |
1 files changed, 89 insertions, 6 deletions
diff --git a/openapi.yaml b/openapi.yaml index d058381..fa6c8d0 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -306,11 +306,94 @@ components: example: "print('Hello, world!')" required: - code - # GameWatcherMessage: - # oneOf: - # - $ref: '#/components/schemas/GameWatcherMessageS2C' - # - $ref: '#/components/schemas/GameWatcherMessageC2S' - # GameWatcherMessageS2C: - # oneOf: + GameWatcherMessage: + oneOf: + - $ref: '#/components/schemas/GameWatcherMessageS2C' + # - $ref: '#/components/schemas/GameWatcherMessageC2S' + GameWatcherMessageS2C: + oneOf: + - $ref: '#/components/schemas/GameWatcherMessageS2CStart' + - $ref: '#/components/schemas/GameWatcherMessageS2CCode' + - $ref: '#/components/schemas/GameWatcherMessageS2CExecResult' + GameWatcherMessageS2CStart: + type: object + properties: + type: + type: string + const: "watcher:s2c:start" + data: + $ref: '#/components/schemas/GameWatcherMessageS2CStartPayload' + required: + - type + - data + GameWatcherMessageS2CStartPayload: + type: object + properties: + start_at: + type: integer + example: 946684800 + required: + - start_at + GameWatcherMessageS2CCode: + type: object + properties: + type: + type: string + const: "watcher:s2c:code" + data: + $ref: '#/components/schemas/GameWatcherMessageS2CCodePayload' + required: + - type + - data + GameWatcherMessageS2CCodePayload: + type: object + properties: + player_id: + type: integer + example: 1 + code: + type: string + example: "print('Hello, world!')" + required: + - player_id + - code + GameWatcherMessageS2CExecResult: + type: object + properties: + type: + type: string + const: "watcher:s2c:execresult" + data: + $ref: '#/components/schemas/GameWatcherMessageS2CExecResultPayload' + required: + - type + - data + GameWatcherMessageS2CExecResultPayload: + type: object + properties: + player_id: + type: integer + example: 1 + status: + type: string + example: "success" + enum: + - success + score: + type: integer + nullable: true + example: 100 + stdout: + type: string + example: "Hello, world!" + stderr: + type: string + example: "" + required: + - player_id + - status + - score + - stdout + - stderr # GameWatcherMessageC2S: # oneOf: |
