From 7576089b8f11751343e1c18347870ac946d76ad3 Mon Sep 17 00:00:00 2001 From: "nathan.tienyou@viacesi.fr" Date: Wed, 1 Mar 2023 14:15:55 +0100 Subject: [PATCH] added some GET routes for player --- reference/OpenAPI.yaml | 93 +++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 50 deletions(-) diff --git a/reference/OpenAPI.yaml b/reference/OpenAPI.yaml index e164220..613e2e3 100644 --- a/reference/OpenAPI.yaml +++ b/reference/OpenAPI.yaml @@ -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: