Adds Adding of Games to the system.
This commit is contained in:
@@ -38,7 +38,6 @@ paths:
|
||||
parameters: []
|
||||
security:
|
||||
- JWT-Auth: []
|
||||
|
||||
/user:
|
||||
post:
|
||||
summary: ''
|
||||
@@ -146,7 +145,7 @@ paths:
|
||||
post:
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
description: "OK"
|
||||
'401':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
'422':
|
||||
@@ -155,6 +154,42 @@ paths:
|
||||
$ref: '#/components/requestBodies/LeaveGamenight'
|
||||
security:
|
||||
- JWT-Auth: []
|
||||
/games:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
$ref: '#/components/responses/GamesResponse'
|
||||
'401':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
'422':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
security:
|
||||
- JWT-Auth: []
|
||||
/game:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
$ref: '#/components/responses/GameResponse'
|
||||
'401':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
'422':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/GetGameRequest'
|
||||
security:
|
||||
- JWT-Auth: []
|
||||
post:
|
||||
responses:
|
||||
'200':
|
||||
description: "OK"
|
||||
'401':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
'422':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/AddGameRequest'
|
||||
security:
|
||||
- JWT-Auth: []
|
||||
|
||||
components:
|
||||
schemas:
|
||||
@@ -256,6 +291,14 @@ components:
|
||||
type: string
|
||||
required:
|
||||
- gamenight_id
|
||||
GameId:
|
||||
title: GameId
|
||||
type: object
|
||||
properties:
|
||||
game_id:
|
||||
type: string
|
||||
required:
|
||||
- game_id
|
||||
GetGamenightRequestBody:
|
||||
type: object
|
||||
properties:
|
||||
@@ -273,6 +316,24 @@ components:
|
||||
required:
|
||||
- id
|
||||
- username
|
||||
Game:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
AddGameRequestBody:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
|
||||
requestBodies:
|
||||
LoginRequest:
|
||||
content:
|
||||
@@ -314,6 +375,16 @@ components:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GamenightId'
|
||||
GetGameRequest:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GameId'
|
||||
AddGameRequest:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/AddGameRequestBody'
|
||||
responses:
|
||||
TokenResponse:
|
||||
description: Example response
|
||||
@@ -353,6 +424,20 @@ components:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
GamesResponse:
|
||||
description: A list of Games in this gamenight instance.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Game'
|
||||
GameResponse:
|
||||
description: A game.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Game'
|
||||
securitySchemes:
|
||||
JWT-Auth:
|
||||
type: http
|
||||
|
||||
Reference in New Issue
Block a user