Update openapi.yaml #1
56
openapi.yaml
56
openapi.yaml
|
@ -1,4 +1,4 @@
|
|||
openapi: 3.1.0
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: PVV Ozai
|
||||
description: PVV Ozai
|
||||
|
@ -6,7 +6,32 @@ info:
|
|||
servers:
|
||||
- url: https://ozai.pvv.ntnu.no
|
||||
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:
|
||||
summary: Find pet by ID
|
||||
description: Returns a single pet
|
||||
|
@ -45,16 +70,17 @@ paths:
|
|||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
- name: playerName
|
||||
in: header
|
||||
description: name of player/bot
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: move
|
||||
in: query
|
||||
description: Mov
|
||||
schema:
|
||||
type: string
|
||||
- name: status
|
||||
in: query
|
||||
description: Status of pet that needs to be updated
|
||||
schema:
|
||||
type: string
|
||||
$ref: '#/components/schemas/Move'
|
||||
responses:
|
||||
'400':
|
||||
description: Invalid input
|
||||
|
@ -63,7 +89,13 @@ components:
|
|||
GameState:
|
||||
type: object
|
||||
properties:
|
||||
currentPlayer:
|
||||
playerNames:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
currentPlayerName:
|
||||
type: string
|
||||
currentPlayerId:
|
||||
type: integer
|
||||
format: int32
|
||||
bag:
|
||||
|
@ -160,6 +192,7 @@ components:
|
|||
type: object
|
||||
properties:
|
||||
player:
|
||||
description: internal playerid (is this player 1 or 2)
|
||||
type: integer
|
||||
format: int32
|
||||
market:
|
||||
|
@ -172,3 +205,8 @@ components:
|
|||
patternLine:
|
||||
type: integer
|
||||
format: int32
|
||||
GameResponse:
|
||||
type: object
|
||||
properties:
|
||||
gameId:
|
||||
type: integer
|
Loading…
Reference in New Issue