From 9fe5a74206b4ab2b801ffa6797ed9bfdc5a4bb45 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Tue, 7 Oct 2025 23:30:11 +0200 Subject: [PATCH] Fixed the error responses of the endpoints for the OpenAPI specification document in the library target. --- Sources/AmiiboService/openapi.yaml | 59 ++++++++++-------------------- 1 file changed, 19 insertions(+), 40 deletions(-) diff --git a/Sources/AmiiboService/openapi.yaml b/Sources/AmiiboService/openapi.yaml index 60b97ae..69744f6 100644 --- a/Sources/AmiiboService/openapi.yaml +++ b/Sources/AmiiboService/openapi.yaml @@ -63,17 +63,17 @@ paths: - Amiibo responses: '200': - description: Response that retuns a decodable JSON object containing a list of Amiibo items. + description: Response that retuns a decodable JSON object wrapping a list of Amiibo items. content: application/json: schema: $ref: '#/components/schemas/AmiiboWrapper' '400': - $ref: '#/components/responses/BadRequest' + description: An amiibo bad request. '404': - $ref: '#/components/responses/NotFound' + description: An amiibo not found. '500': - $ref: '#/components/responses/Unavailable' + description: Service is not available. parameters: - name: amiiboSeries in: query @@ -155,11 +155,11 @@ paths: '200': $ref: '#/components/responses/SuccessTuple' '400': - $ref: '#/components/responses/BadRequest' + description: An amiibo series bad request. '404': - $ref: '#/components/responses/NotFound' + description: An amiibo series not found. '500': - $ref: '#/components/responses/Unavailable' + description: Service is not available. parameters: - name: key in: query @@ -185,11 +185,11 @@ paths: '200': $ref: '#/components/responses/SuccessTuple' '400': - $ref: '#/components/responses/BadRequest' + description: A game character bad request. '404': - $ref: '#/components/responses/NotFound' + description: A game character not found. '500': - $ref: '#/components/responses/Unavailable' + description: Service is not available. parameters: - name: key in: query @@ -215,11 +215,11 @@ paths: '200': $ref: '#/components/responses/SuccessTuple' '400': - $ref: '#/components/responses/BadRequest' + description: A game series bad request. '404': - $ref: '#/components/responses/NotFound' + description: A game series not found. '500': - $ref: '#/components/responses/Unavailable' + description: Service is not available. parameters: - name: key in: query @@ -245,11 +245,11 @@ paths: '200': $ref: '#/components/responses/SuccessTuple' '400': - $ref: '#/components/responses/BadRequest' + description: An amiibo type bad request. '404': - $ref: '#/components/responses/NotFound' + description: An amiibo type not found. '500': - $ref: '#/components/responses/Unavailable' + description: Service is not available. parameters: - name: key in: query @@ -279,40 +279,19 @@ paths: schema: $ref: '#/components/schemas/LastUpdated' '400': - $ref: '#/components/responses/BadRequest' + description: A last updated bad request. '404': - $ref: '#/components/responses/NotFound' + description: A last updated not found. '500': - $ref: '#/components/responses/Unavailable' + description: Service is not available. components: responses: - BadRequest: - description: Response that indicates the service received a bad request. - content: - text/plain: - schema: - type: string - example: "Bad request" - NotFound: - description: Response that indicates the service cannot find a requested resource. - content: - text/plain: - schema: - type: string - example: "Not found" SuccessTuple: description: Response that returns a JSON object containing requested `Tuple` data from a resource. content: application/json: schema: $ref: '#/components/schemas/TupleWrapper' - Unavailable: - description: Response that indicates the service is unavailable to respond to requests. - content: - text/plain: - schema: - type: string - example: "Service unavailable" schemas: # Core Entities Amiibo: