Update openapi.yaml #1

Merged
adriangl merged 1 commits from openapi-update into main 2024-01-28 00:58:57 +01:00
1 changed files with 47 additions and 9 deletions
Showing only changes of commit 9005fe9984 - Show all commits

View File

@ -1,4 +1,4 @@
openapi: 3.1.0 openapi: 3.0.0
info: info:
title: PVV Ozai title: PVV Ozai
description: PVV Ozai description: PVV Ozai
@ -6,7 +6,32 @@ info:
servers: servers:
- url: https://ozai.pvv.ntnu.no - url: https://ozai.pvv.ntnu.no
paths: paths:
/{gameId}: /game:
post:
summary: Create a game
description: Creates a game
operationId: createGame
parameters:
- name: playerNames
in: query
description: Unique list of players to join the game. (Length of 2-4)
required: true
schema:
type: array
items:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/GameResponse'
'400':
description: Invalid input
/game/{gameId}:
get: get:
summary: Find pet by ID summary: Find pet by ID
description: Returns a single pet description: Returns a single pet
@ -45,16 +70,17 @@ paths:
schema: schema:
type: integer type: integer
format: int64 format: int64
- name: playerName
in: header
description: name of player/bot
required: true
schema:
type: string
- name: move - name: move
in: query in: query
description: Mov description: Mov
schema: schema:
type: string $ref: '#/components/schemas/Move'
- name: status
in: query
description: Status of pet that needs to be updated
schema:
type: string
responses: responses:
'400': '400':
description: Invalid input description: Invalid input
@ -63,7 +89,13 @@ components:
GameState: GameState:
type: object type: object
properties: properties:
currentPlayer: playerNames:
type: array
items:
type: string
currentPlayerName:
type: string
currentPlayerId:
type: integer type: integer
format: int32 format: int32
bag: bag:
@ -160,6 +192,7 @@ components:
type: object type: object
properties: properties:
player: player:
description: internal playerid (is this player 1 or 2)
type: integer type: integer
format: int32 format: int32
market: market:
@ -172,3 +205,8 @@ components:
patternLine: patternLine:
type: integer type: integer
format: int32 format: int32
GameResponse:
type: object
properties:
gameId:
type: integer