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

This commit is contained in:
2025-10-14 23:54:38 +02:00
parent df8c650f9d
commit 972c2f4487
+44 -5
View File
@@ -149,10 +149,14 @@ paths:
style: form
/amiiboseries:
get:
description: Get a list of all the Amiibo series available in the database.
operationId: getAmiiboSeries
tags:
- Amiibo
summary: Get the amiibo series.
description: |
Get a list of all the Amiibo series available in the database.
Please refer to [the documentation of the endpoint](https://www.amiiboapi.com/docs/#series) for further information.
operationId: getAmiiboSeries
parameters:
- $ref: '#/components/parameters/Key'
description: A key of an amiibo series to include in the response.
@@ -160,11 +164,15 @@ paths:
description: A name of an amiibo series key to include in the response.
responses:
'200':
$ref: '#/components/responses/SuccessTuple'
description: Successful response returning an object that contains one or more amiibo series.
content:
application/json:
schema:
$ref: '#/components/schemas/AmiiboSeriesWrapper'
'400':
description: An amiibo series bad request.
$ref: '#/components/responses/BadRequest'
'404':
description: An amiibo series not found.
$ref: '#/components/responses/NotFound'
'500':
description: Service is not available.
/character:
@@ -412,6 +420,16 @@ components:
description: A release date for North America, if any.
type: string
format: date-time
AmiiboSeries:
description: A type that represents an amiibo series.
allOf:
- $ref: '#/components/schemas/Tuple'
- type: object
properties:
key:
description: A key of an amiibo series.
name:
description: A name of an amiibo series.
AmiiboType:
description: A type that represents an amiibo type.
allOf:
@@ -497,11 +515,21 @@ components:
items:
description: A list if `Amiibo` instance.
$ref: '#/components/schemas/Amiibo'
AmiiboSeriesList:
description: A type that represents a list of amiibo series.
type: array
items:
$ref: '#/components/schemas/AmiiboSeries'
AmiiboTypeList:
description: A type that represents a list of amiibo types.
type: array
items:
$ref: '#/components/schemas/AmiiboType'
GameCharacterList:
description: A type that represents a list of game characters.
type: array
items:
$ref: '#/components/schemas/GameCharacter'
GameSeriesList:
description: A type that represents a list of game series.
type: array
@@ -517,6 +545,17 @@ components:
- $ref: '#/components/schemas/AmiiboList'
required:
- amiibo
AmiiboSeriesWrapper:
description: A type that wraps either one or a list of amiibo series.
type: object
properties:
amiibo:
description: A container that have one or more amiibo series.
oneOf:
- $ref: '#/components/schemas/AmiiboSeries'
- $ref: '#/components/schemas/AmiiboSeriesList'
required:
- amiibo
AmiiboTypeWrapper:
description: A type that wraps either one or a list of amiibo types.
type: object