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: [] tags: []
responses: responses:
'200': '200':
description: User Found description: Player Found
content: content:
application/json: application/json:
schema: schema:
@@ -38,60 +38,41 @@ paths:
description: User Not Found description: User Not Found
operationId: get-player-by-id operationId: get-player-by-id
description: Retrieve the information of the player with the matching id description: Retrieve the information of the player with the matching id
/user: '/players/name/{name}':
post: parameters:
summary: Create New User - schema:
operationId: post-user type: string
name: name
in: path
required: true
get:
summary: Get Player by ID
tags: []
responses: responses:
'200': '200':
description: User Created description: Player Found
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/User' $ref: '#/components/schemas/Player'
examples: '404':
New User Bob Fellow: description: Player Not Found
value: operationId: get-player-by-name
id: 12 description: ''
firstName: Bob /servers/:
lastName: Fellow get:
email: bob.fellow@gmail.com summary: Get Server list
dateOfBirth: '1996-08-24' tags: []
emailVerified: false responses:
createDate: '2020-11-18' '200':
'400': description: OK
description: Missing Required Information content:
'409': application/json:
description: Email Already Taken schema:
requestBody: type: array
content: items:
application/json: $ref: '#/components/schemas/Server'
schema: operationId: get-servers
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.
components: components:
schemas: schemas:
Player: Player:
@@ -152,6 +133,18 @@ components:
required: required:
- id - id
- internal - internal
Server:
title: Server
x-stoplight:
id: hjfwmi2ae419o
type: object
properties:
id:
type: string
token:
type: string
name:
type: string
Kill: Kill:
title: Kill title: Kill
x-stoplight: x-stoplight: