From 0ad7b9e54615eedfffa41709900d8e86814d2471 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 1 Aug 2024 21:06:50 +0900 Subject: feat: explicitly define 401 responses in OpenAPI spec --- openapi.yaml | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 3 deletions(-) (limited to 'openapi.yaml') diff --git a/openapi.yaml b/openapi.yaml index f28452b..a19a673 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -69,8 +69,8 @@ paths: example: "xxxxx.xxxxx.xxxxx" required: - token - '403': - description: Forbidden + '401': + description: Unauthorized content: application/json: schema: @@ -78,7 +78,7 @@ paths: properties: message: type: string - example: "Forbidden operation" + example: "Unauthorized" required: - message /games: @@ -109,6 +109,18 @@ paths: $ref: '#/components/schemas/Game' required: - games + '401': + description: Unauthorized + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: "Unauthorized" + required: + - message '403': description: Forbidden content: @@ -147,6 +159,18 @@ paths: $ref: '#/components/schemas/Game' required: - game + '401': + description: Unauthorized + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: "Unauthorized" + required: + - message '403': description: Forbidden content: @@ -194,6 +218,18 @@ paths: $ref: '#/components/schemas/User' required: - users + '401': + description: Unauthorized + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: "Unauthorized" + required: + - message '403': description: Forbidden content: @@ -229,6 +265,18 @@ paths: $ref: '#/components/schemas/Game' required: - games + '401': + description: Unauthorized + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: "Unauthorized" + required: + - message '403': description: Forbidden content: @@ -267,6 +315,18 @@ paths: $ref: '#/components/schemas/Game' required: - game + '401': + description: Unauthorized + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: "Unauthorized" + required: + - message '403': description: Forbidden content: @@ -351,6 +411,18 @@ paths: example: "Invalid request" required: - message + '401': + description: Unauthorized + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: "Unauthorized" + required: + - message '403': description: Forbidden content: -- cgit v1.2.3-70-g09d2