diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-07-28 16:01:41 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-07-28 17:12:45 +0900 |
| commit | 2d5f913a431c4223a16c88551ffff4100ac483c4 (patch) | |
| tree | 4ea9f9db9dbe7cf1b7720205ae281a6b8bcca8e9 /openapi.yaml | |
| parent | 0dd94cbea6e857896c46d17493725f97369d99f9 (diff) | |
| download | phperkaigi-2025-albatross-2d5f913a431c4223a16c88551ffff4100ac483c4.tar.gz phperkaigi-2025-albatross-2d5f913a431c4223a16c88551ffff4100ac483c4.tar.zst phperkaigi-2025-albatross-2d5f913a431c4223a16c88551ffff4100ac483c4.zip | |
feat: implement game entry
Diffstat (limited to 'openapi.yaml')
| -rw-r--r-- | openapi.yaml | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/openapi.yaml b/openapi.yaml index 786e11e..002b229 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -47,6 +47,46 @@ paths: example: "Invalid credentials" required: - message + /games: + get: + summary: List games + parameters: + - in: query + name: player_id + schema: + type: integer + required: false + - in: header + name: Authorization + schema: + type: string + required: true + responses: + '200': + description: List of games + content: + application/json: + schema: + type: object + properties: + games: + type: array + items: + $ref: '#/components/schemas/Game' + required: + - games + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: "Forbidden operation" + required: + - message components: schemas: JwtPayload: @@ -72,3 +112,52 @@ components: - username - display_name - is_admin + Game: + type: object + properties: + game_id: + type: integer + example: 1 + state: + type: string + example: "active" + enum: + - closed + - waiting_entries + - waiting_start + - prepare + - starting + - gaming + - finished + display_name: + type: string + example: "Game 1" + duration_seconds: + type: integer + example: 360 + started_at: + type: integer + example: 946684800 + problem: + $ref: '#/components/schemas/Problem' + required: + - game_id + - state + - display_name + - duration_seconds + Problem: + type: object + properties: + problem_id: + type: integer + example: 1 + title: + type: string + example: "Problem 1" + description: + type: string + example: "This is a problem" + required: + - problem_id + - title + - description |
