Improved the Open API specification document #19

Merged
javier merged 14 commits from library/tests-update into main 2025-10-14 23:26:43 +00:00
Showing only changes of commit df8c650f9d - Show all commits
+34 -5
View File
@@ -169,10 +169,14 @@ paths:
description: Service is not available. description: Service is not available.
/character: /character:
get: get:
description: Get a list of all the game characters available in the database.
operationId: getGameCharacters
tags: tags:
- Game - Game
summary: Get the game characters.
description: |
Get a list of all the game characters available in the database.
Please refer to [the documentation of the endpoint](https://www.amiiboapi.com/docs/#character) for further information.
operationId: getGameCharacters
parameters: parameters:
- $ref: '#/components/parameters/Key' - $ref: '#/components/parameters/Key'
description: A key of a game character key to include in the response. description: A key of a game character key to include in the response.
@@ -180,11 +184,15 @@ paths:
description: A name of a game character key to include in the response. description: A name of a game character key to include in the response.
responses: responses:
'200': '200':
$ref: '#/components/responses/SuccessTuple' description: Successful response returning an object that contains one or more game characters.
content:
application/json:
schema:
$ref: '#/components/schemas/GameCharacterWrapper'
'400': '400':
description: A game character bad request. $ref: '#/components/responses/BadRequest'
'404': '404':
description: A game character not found. $ref: '#/components/responses/NotFound'
'500': '500':
description: Service is not available. description: Service is not available.
/gameseries: /gameseries:
@@ -427,6 +435,16 @@ components:
required: required:
- Usage - Usage
- write - write
GameCharacter:
description: A type that represents a game character.
allOf:
- $ref: '#/components/schemas/Tuple'
- type: object
properties:
key:
description: A key of a game character.
name:
description: A name of a game character.
GameSeries: GameSeries:
description: A type that represents a game series. description: A type that represents a game series.
allOf: allOf:
@@ -510,6 +528,17 @@ components:
- $ref: '#/components/schemas/AmiiboTypeList' - $ref: '#/components/schemas/AmiiboTypeList'
required: required:
- amiibo - amiibo
GameCharacterWrapper:
description: A type that wraps either one or a list of game characters.
type: object
properties:
amiibo:
description: A container that have one or more game characters.
oneOf:
- $ref: '#/components/schemas/GameCharacter'
- $ref: '#/components/schemas/GameCharacterList'
required:
- amiibo
GameSeriesWrapper: GameSeriesWrapper:
description: A type that wraps either one or a list of game series. description: A type that wraps either one or a list of game series.
type: object type: object