diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-07-28 20:22:30 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-07-29 00:45:17 +0900 |
| commit | fb31ac445245f26c10a38ac6ac60916bfbbca976 (patch) | |
| tree | 63b83367cb28c52930a6319bfe157306723fb84e /openapi.yaml | |
| parent | 514ee5a55bb810ea2ac56cdd125a73651bdc167d (diff) | |
| download | phperkaigi-2025-albatross-fb31ac445245f26c10a38ac6ac60916bfbbca976.tar.gz phperkaigi-2025-albatross-fb31ac445245f26c10a38ac6ac60916bfbbca976.tar.zst phperkaigi-2025-albatross-fb31ac445245f26c10a38ac6ac60916bfbbca976.zip | |
feat: add game messages to openapi spec
Diffstat (limited to 'openapi.yaml')
| -rw-r--r-- | openapi.yaml | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/openapi.yaml b/openapi.yaml index 002b229..4360b21 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -161,3 +161,76 @@ components: - problem_id - title - description + GamePlayerMessage: + oneOf: + - $ref: '#/components/schemas/GamePlayerMessageS2C' + - $ref: '#/components/schemas/GamePlayerMessageC2S' + GamePlayerMessageS2C: + oneOf: + - $ref: '#/components/schemas/GamePlayerMessageS2CPrepare' + - $ref: '#/components/schemas/GamePlayerMessageS2CStart' + GamePlayerMessageS2CPrepare: + type: object + properties: + type: + type: string + const: "player:s2c:prepare" + data: + $ref: '#/components/schemas/GamePlayerMessageS2CPreparePayload' + required: + - type + - data + GamePlayerMessageS2CPreparePayload: + type: object + properties: + problem: + $ref: '#/components/schemas/Problem' + required: + - problem + GamePlayerMessageS2CStart: + type: object + properties: + type: + type: string + const: "player:s2c:start" + data: + $ref: '#/components/schemas/GamePlayerMessageS2CStartPayload' + required: + - type + - data + GamePlayerMessageS2CStartPayload: + type: object + properties: + start_at: + type: integer + example: 946684800 + required: + - start_at + GamePlayerMessageC2S: + oneOf: + - $ref: '#/components/schemas/GamePlayerMessageC2SEntry' + - $ref: '#/components/schemas/GamePlayerMessageC2SReady' + GamePlayerMessageC2SEntry: + type: object + properties: + type: + type: string + const: "player:c2s:entry" + required: + - type + GamePlayerMessageC2SReady: + type: object + properties: + type: + type: string + const: "player:c2s:ready" + required: + - type + # GameWatcherMessage: + # oneOf: + # - $ref: '#/components/schemas/GameWatcherMessageS2C' + # - $ref: '#/components/schemas/GameWatcherMessageC2S' + # GameWatcherMessageS2C: + # oneOf: + # GameWatcherMessageC2S: + # oneOf: |
