Improved the definition of the GET /character endpoint for the OpenAPI specification document in the library target.

This commit is contained in:
2025-10-14 23:48:05 +02:00
parent 739182a7ae
commit df8c650f9d
+34 -5
View File
@@ -169,10 +169,14 @@ paths:
description: Service is not available.
/character:
get:
description: Get a list of all the game characters available in the database.
operationId: getGameCharacters
tags:
- 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:
- $ref: '#/components/parameters/Key'
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.
responses:
'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':
description: A game character bad request.
$ref: '#/components/responses/BadRequest'
'404':
description: A game character not found.
$ref: '#/components/responses/NotFound'
'500':
description: Service is not available.
/gameseries:
@@ -427,6 +435,16 @@ components:
required:
- Usage
- 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:
description: A type that represents a game series.
allOf:
@@ -510,6 +528,17 @@ components:
- $ref: '#/components/schemas/AmiiboTypeList'
required:
- 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:
description: A type that wraps either one or a list of game series.
type: object