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

This commit is contained in:
2025-10-14 23:42:11 +02:00
parent 9140707712
commit 739182a7ae
+48 -13
View File
@@ -189,10 +189,14 @@ paths:
description: Service is not available. description: Service is not available.
/gameseries: /gameseries:
get: get:
description: Gets a list of all the game series available in the database.
operationId: getGameSeries
tags: tags:
- Game - Game
summary: Get the game series.
description: |
Gets a list of all the Game series available in the database.
Please refer to [the documentation of the endpoint](https://www.amiiboapi.com/docs/#gameSeries) for further information.
operationId: getGameSeries
parameters: parameters:
- $ref: '#/components/parameters/Key' - $ref: '#/components/parameters/Key'
description: A key of a game series to include in the response. description: A key of a game series to include in the response.
@@ -200,11 +204,15 @@ paths:
description: A name of a game series to include in the response. description: A name of a game series 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 series.
content:
application/json:
schema:
$ref: '#/components/schemas/GameSeriesWrapper'
'400': '400':
description: A game series bad request. $ref: '#/components/responses/BadRequest'
'404': '404':
description: A game series not found. $ref: '#/components/responses/NotFound'
'500': '500':
description: Service is not available. description: Service is not available.
/type: /type:
@@ -213,7 +221,7 @@ paths:
- Amiibo - Amiibo
summary: Get the amiibo types. summary: Get the amiibo types.
description: | description: |
Gets a list of all the Amiibo types available in the database. Gets a list of all the amiibo types available in the database.
Please refer to [the documentation of the endpoint](https://www.amiiboapi.com/docs/#type) for further information. Please refer to [the documentation of the endpoint](https://www.amiiboapi.com/docs/#type) for further information.
operationId: getAmiiboTypes operationId: getAmiiboTypes
@@ -224,7 +232,7 @@ paths:
description: A name of an amiibo type to include in the response. description: A name of an amiibo type to include in the response.
responses: responses:
'200': '200':
description: Successful response returning an object that contains one or more Amiibo types. description: Successful response returning an object that contains one or more amiibo types.
content: content:
application/json: application/json:
schema: schema:
@@ -397,15 +405,15 @@ components:
type: string type: string
format: date-time format: date-time
AmiiboType: AmiiboType:
description: A type that represents an Amiibo type. description: A type that represents an amiibo type.
allOf: allOf:
- $ref: '#/components/schemas/Tuple' - $ref: '#/components/schemas/Tuple'
- type: object - type: object
properties: properties:
key: key:
description: A key of an Amiibo type. description: A key of an amiibo type.
name: name:
description: A name of an Amiibo type. description: A name of an amiibo type.
AmiiboUsage: AmiiboUsage:
description: A type that represents a use of an Amiibo in a game. description: A type that represents a use of an Amiibo in a game.
type: object type: object
@@ -419,6 +427,16 @@ components:
required: required:
- Usage - Usage
- write - write
GameSeries:
description: A type that represents a game series.
allOf:
- $ref: '#/components/schemas/Tuple'
- type: object
properties:
key:
description: A key of a game series.
name:
description: A name of a game series.
LastUpdated: LastUpdated:
description: A type that informs when the data in the service was last updated. description: A type that informs when the data in the service was last updated.
type: object type: object
@@ -462,10 +480,16 @@ components:
description: A list if `Amiibo` instance. description: A list if `Amiibo` instance.
$ref: '#/components/schemas/Amiibo' $ref: '#/components/schemas/Amiibo'
AmiiboTypeList: AmiiboTypeList:
description: A type that represents a list of Amiibo types. description: A type that represents a list of amiibo types.
type: array type: array
items: items:
$ref: '#/components/schemas/AmiiboType' $ref: '#/components/schemas/AmiiboType'
GameSeriesList:
description: A type that represents a list of game series.
type: array
items:
$ref: '#/components/schemas/GameSeries'
# Wrapper Entities
type: object type: object
properties: properties:
amiibo: amiibo:
@@ -476,16 +500,27 @@ components:
required: required:
- amiibo - amiibo
AmiiboTypeWrapper: AmiiboTypeWrapper:
description: A type that wraps either one or a list of Amiibo types. description: A type that wraps either one or a list of amiibo types.
type: object type: object
properties: properties:
amiibo: amiibo:
description: A container that have one or more Amiibo types. description: A container that have one or more amiibo types.
oneOf: oneOf:
- $ref: '#/components/schemas/AmiiboType' - $ref: '#/components/schemas/AmiiboType'
- $ref: '#/components/schemas/AmiiboTypeList' - $ref: '#/components/schemas/AmiiboTypeList'
required: required:
- amiibo - amiibo
GameSeriesWrapper:
description: A type that wraps either one or a list of game series.
type: object
properties:
amiibo:
description: A container that have one or more game series.
oneOf:
- $ref: '#/components/schemas/GameSeries'
- $ref: '#/components/schemas/GameSeriesList'
required:
- amiibo
# Error Entities # Error Entities
ServiceError: ServiceError:
description: A type that represents an error provided by the service. description: A type that represents an error provided by the service.