diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-01 21:10:42 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-01 21:10:42 +0900 |
| commit | ebb1129ae9ef16139a32bf899d42009176642299 (patch) | |
| tree | 5914c4d25ebe40e5a149da762624e9a5352c395d /openapi.yaml | |
| parent | 72012983718a8d1f1d850e24e9af3a29fb20374a (diff) | |
| download | phperkaigi-2025-albatross-ebb1129ae9ef16139a32bf899d42009176642299.tar.gz phperkaigi-2025-albatross-ebb1129ae9ef16139a32bf899d42009176642299.tar.zst phperkaigi-2025-albatross-ebb1129ae9ef16139a32bf899d42009176642299.zip | |
refactor: simplify parameter definitions in OpenAPI spec
Diffstat (limited to 'openapi.yaml')
| -rw-r--r-- | openapi.yaml | 73 |
1 files changed, 23 insertions, 50 deletions
diff --git a/openapi.yaml b/openapi.yaml index 637ea3d..1dd4614 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -53,11 +53,7 @@ paths: operationId: getToken summary: Get a short-lived access token parameters: - - in: header - name: Authorization - schema: - type: string - required: true + - $ref: '#/components/parameters/header_authorization' responses: '200': description: Successfully authenticated @@ -88,11 +84,7 @@ paths: operationId: getGames summary: List games parameters: - - in: header - name: Authorization - schema: - type: string - required: true + - $ref: '#/components/parameters/header_authorization' responses: '200': description: List of games @@ -136,16 +128,8 @@ paths: operationId: getGame summary: Get a game parameters: - - in: path - name: game_id - schema: - type: integer - required: true - - in: header - name: Authorization - schema: - type: string - required: true + - $ref: '#/components/parameters/header_authorization' + - $ref: '#/components/parameters/path_game_id' responses: '200': description: A game @@ -199,11 +183,7 @@ paths: operationId: adminGetUsers summary: List all users parameters: - - in: header - name: Authorization - schema: - type: string - required: true + - $ref: '#/components/parameters/header_authorization' responses: '200': description: List of users @@ -247,11 +227,7 @@ paths: operationId: adminGetGames summary: List games parameters: - - in: header - name: Authorization - schema: - type: string - required: true + - $ref: '#/components/parameters/header_authorization' responses: '200': description: List of games @@ -295,16 +271,8 @@ paths: operationId: adminGetGame summary: Get a game parameters: - - in: path - name: game_id - schema: - type: integer - required: true - - in: header - name: Authorization - schema: - type: string - required: true + - $ref: '#/components/parameters/header_authorization' + - $ref: '#/components/parameters/path_game_id' responses: '200': description: A game @@ -357,16 +325,8 @@ paths: operationId: adminPutGame summary: Update a game parameters: - - in: path - name: game_id - schema: - type: integer - required: true - - in: header - name: Authorization - schema: - type: string - required: true + - $ref: '#/components/parameters/header_authorization' + - $ref: '#/components/parameters/path_game_id' requestBody: required: true content: @@ -451,6 +411,19 @@ paths: required: - message components: + parameters: + header_authorization: + in: header + name: Authorization + schema: + type: string + required: true + path_game_id: + in: path + name: game_id + schema: + type: integer + required: true schemas: User: type: object |
