added some GET routes for player

This commit is contained in:
2023-03-01 14:15:55 +01:00
parent 851d75c81a
commit 7576089b8f
+43 -50
View File
@@ -19,7 +19,7 @@ paths:
tags: []
responses:
'200':
description: User Found
description: Player Found
content:
application/json:
schema:
@@ -38,60 +38,41 @@ paths:
description: User Not Found
operationId: get-player-by-id
description: Retrieve the information of the player with the matching id
/user:
post:
summary: Create New User
operationId: post-user
'/players/name/{name}':
parameters:
- schema:
type: string
name: name
in: path
required: true
get:
summary: Get Player by ID
tags: []
responses:
'200':
description: User Created
description: Player Found
content:
application/json:
schema:
$ref: '#/components/schemas/User'
examples:
New User Bob Fellow:
value:
id: 12
firstName: Bob
lastName: Fellow
email: bob.fellow@gmail.com
dateOfBirth: '1996-08-24'
emailVerified: false
createDate: '2020-11-18'
'400':
description: Missing Required Information
'409':
description: Email Already Taken
requestBody:
content:
application/json:
schema:
type: object
properties:
firstName:
type: string
lastName:
type: string
email:
type: string
dateOfBirth:
type: string
format: date
required:
- firstName
- lastName
- email
- dateOfBirth
examples:
Create User Bob Fellow:
value:
firstName: Bob
lastName: Fellow
email: bob.fellow@gmail.com
dateOfBirth: '1996-08-24'
description: Post the necessary fields for the API to create a new user.
description: Create a new user.
$ref: '#/components/schemas/Player'
'404':
description: Player Not Found
operationId: get-player-by-name
description: ''
/servers/:
get:
summary: Get Server list
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Server'
operationId: get-servers
components:
schemas:
Player:
@@ -152,6 +133,18 @@ components:
required:
- id
- internal
Server:
title: Server
x-stoplight:
id: hjfwmi2ae419o
type: object
properties:
id:
type: string
token:
type: string
name:
type: string
Kill:
title: Kill
x-stoplight: