aboutsummaryrefslogtreecommitdiffhomepage
path: root/openapi.yaml
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-07-29 02:38:54 +0900
committernsfisis <nsfisis@gmail.com>2024-07-29 02:39:55 +0900
commit4c7238f58dcc463d22d50bfc6cd2aaae70e41958 (patch)
tree2cdddb38cdbe0fbb54db91ae75a287ec1e63f32b /openapi.yaml
parentdf57e43059a230062d903f55f9af7339828875c3 (diff)
downloadiosdc-japan-2024-albatross-4c7238f58dcc463d22d50bfc6cd2aaae70e41958.tar.gz
iosdc-japan-2024-albatross-4c7238f58dcc463d22d50bfc6cd2aaae70e41958.tar.zst
iosdc-japan-2024-albatross-4c7238f58dcc463d22d50bfc6cd2aaae70e41958.zip
feat: define GamePlayerMessageC2SCode and GamePlayerMessageS2CExecResult
Diffstat (limited to 'openapi.yaml')
-rw-r--r--openapi.yaml49
1 files changed, 48 insertions, 1 deletions
diff --git a/openapi.yaml b/openapi.yaml
index 3ee0dad..d058381 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -153,7 +153,7 @@ components:
example: 1
state:
type: string
- example: "active"
+ example: "closed"
enum:
- closed
- waiting_entries
@@ -202,6 +202,7 @@ components:
oneOf:
- $ref: '#/components/schemas/GamePlayerMessageS2CPrepare'
- $ref: '#/components/schemas/GamePlayerMessageS2CStart'
+ - $ref: '#/components/schemas/GamePlayerMessageS2CExecResult'
GamePlayerMessageS2CPrepare:
type: object
properties:
@@ -239,10 +240,37 @@ components:
example: 946684800
required:
- start_at
+ GamePlayerMessageS2CExecResult:
+ type: object
+ properties:
+ type:
+ type: string
+ const: "player:s2c:execresult"
+ data:
+ $ref: '#/components/schemas/GamePlayerMessageS2CExecResultPayload'
+ required:
+ - type
+ - data
+ GamePlayerMessageS2CExecResultPayload:
+ type: object
+ properties:
+ status:
+ type: string
+ example: "success"
+ enum:
+ - success
+ score:
+ type: integer
+ nullable: true
+ example: 100
+ required:
+ - status
+ - score
GamePlayerMessageC2S:
oneOf:
- $ref: '#/components/schemas/GamePlayerMessageC2SEntry'
- $ref: '#/components/schemas/GamePlayerMessageC2SReady'
+ - $ref: '#/components/schemas/GamePlayerMessageC2SCode'
GamePlayerMessageC2SEntry:
type: object
properties:
@@ -259,6 +287,25 @@ components:
const: "player:c2s:ready"
required:
- type
+ GamePlayerMessageC2SCode:
+ type: object
+ properties:
+ type:
+ type: string
+ const: "player:c2s:code"
+ data:
+ $ref: '#/components/schemas/GamePlayerMessageC2SCodePayload'
+ required:
+ - type
+ - data
+ GamePlayerMessageC2SCodePayload:
+ type: object
+ properties:
+ code:
+ type: string
+ example: "print('Hello, world!')"
+ required:
+ - code
# GameWatcherMessage:
# oneOf:
# - $ref: '#/components/schemas/GameWatcherMessageS2C'