Improved the definition of the GET /amiibo endpoint for the OpenAPI specification document in the library target.
This commit is contained in:
+116
-116
@@ -58,95 +58,39 @@ externalDocs:
|
|||||||
paths:
|
paths:
|
||||||
/amiibo:
|
/amiibo:
|
||||||
get:
|
get:
|
||||||
summary: Get a list of Amiibo items.
|
summary: Get a list of amiibos.
|
||||||
description: Get a list of all the Amiibo items available in the database.
|
description: |
|
||||||
|
Get a list of all the Amiibo items available in the database.
|
||||||
|
|
||||||
|
Please refer to [the documentation of the endpoint](https://www.amiiboapi.com/docs/#amiibo) for further information.
|
||||||
operationId: getAmiibos
|
operationId: getAmiibos
|
||||||
tags:
|
tags:
|
||||||
- Amiibo
|
- Amiibo
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/Identifier'
|
||||||
|
- $ref: '#/components/parameters/IdentifierHead'
|
||||||
|
- $ref: '#/components/parameters/IdentifierTail'
|
||||||
|
- $ref: '#/components/parameters/Name'
|
||||||
|
description: A name of an amiibo to include in the response.
|
||||||
|
- $ref: '#/components/parameters/AmiiboType'
|
||||||
|
- $ref: '#/components/parameters/AmiiboSeries'
|
||||||
|
- $ref: '#/components/parameters/GameCharacter'
|
||||||
|
- $ref: '#/components/parameters/GameSeries'
|
||||||
|
- $ref: '#/components/parameters/ShowGames'
|
||||||
|
- $ref: '#/components/parameters/ShowUsage'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Response that retuns a decodable JSON object wrapping a list of Amiibo items.
|
description: Successful response returning an object that contains none, one or more amiibos.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/AmiiboWrapper'
|
$ref: '#/components/schemas/AmiiboWrapper'
|
||||||
'400':
|
'400':
|
||||||
description: An amiibo bad request.
|
$ref: '#/components/responses/BadRequest'
|
||||||
'404':
|
'404':
|
||||||
description: An amiibo not found.
|
$ref: '#/components/responses/NotFound'
|
||||||
'500':
|
'500':
|
||||||
description: Service is not available.
|
description: Service is not available.
|
||||||
parameters:
|
|
||||||
- name: amiiboSeries
|
|
||||||
in: query
|
|
||||||
description: An identifier or name of an Amiibo to filter the response.
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
style: form
|
|
||||||
- name: character
|
|
||||||
in: query
|
|
||||||
description: An identifier or name of a game character to filter the response.
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
style: form
|
|
||||||
- name: gameseries
|
|
||||||
in: query
|
|
||||||
description: An identifier or name of a game series to filter the response.
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
style: form
|
|
||||||
- name: head
|
|
||||||
in: query
|
|
||||||
description: A last part of an identifier to filter the response.
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
style: form
|
|
||||||
- name: id
|
|
||||||
in: query
|
|
||||||
description: An identifier of an Amiibo to filter the response.
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
style: form
|
|
||||||
- name: name
|
|
||||||
in: query
|
|
||||||
description: A name of an Amiibo to filter the response.
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
style: form
|
|
||||||
- name: showgames
|
|
||||||
in: query
|
|
||||||
description: A flag that indicates whether to include information about related games.
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: boolean
|
|
||||||
style: form
|
|
||||||
- name: showusage
|
|
||||||
in: query
|
|
||||||
description: A flag that indicates whether to include information about Amiibo usage in related games.
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: boolean
|
|
||||||
style: form
|
|
||||||
- name: tail
|
|
||||||
in: query
|
|
||||||
description: A first part of an identifier to filter the response.
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
style: form
|
|
||||||
- name: type
|
|
||||||
in: query
|
|
||||||
description: An identifier or a name of an Amiibo type to filter the response.
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
style: form
|
|
||||||
/amiiboseries:
|
/amiiboseries:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -280,6 +224,58 @@ paths:
|
|||||||
description: Service is not available.
|
description: Service is not available.
|
||||||
components:
|
components:
|
||||||
parameters:
|
parameters:
|
||||||
|
AmiiboSeries:
|
||||||
|
description: An identifier or name of an amiibo series to include in the response
|
||||||
|
name: amiiboSeries
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
AmiiboType:
|
||||||
|
description: An identifier or a name of an amiibo type to inclulde in the response.
|
||||||
|
name: type
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
GameCharacter:
|
||||||
|
description: An identifier or name of a game character to include in the response.
|
||||||
|
name: character
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
GameSeries:
|
||||||
|
description: An identifier or name of a game series to include in the response.
|
||||||
|
name: gameseries
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
Identifier:
|
||||||
|
description: An identifier of an amiibo to include in the response.
|
||||||
|
name: id
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
maxLength: 18
|
||||||
|
IdentifierHead:
|
||||||
|
description: A first part for an identifier of an amiibo to include the response.
|
||||||
|
name: head
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
maxLength: 10
|
||||||
|
IdentifierTail:
|
||||||
|
description: A last part for an identifier of an amiibo to include the response.
|
||||||
|
name: tail
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
maxLength: 10
|
||||||
Key:
|
Key:
|
||||||
description: A key of a type to include in the response.
|
description: A key of a type to include in the response.
|
||||||
name: key
|
name: key
|
||||||
@@ -294,6 +290,20 @@ components:
|
|||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
ShowGames:
|
||||||
|
description: A flag that indicates whether to include information about related games.
|
||||||
|
name: showgames
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
ShowUsage:
|
||||||
|
description: A flag that indicates whether to include information about amiibo usages in related games.
|
||||||
|
name: showusage
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
responses:
|
responses:
|
||||||
BadRequest:
|
BadRequest:
|
||||||
description: One or more incorrect parameters have been sent.
|
description: One or more incorrect parameters have been sent.
|
||||||
@@ -310,59 +320,62 @@ components:
|
|||||||
schemas:
|
schemas:
|
||||||
# Core Entities
|
# Core Entities
|
||||||
Amiibo:
|
Amiibo:
|
||||||
description: A type that contains all the information about an Amiibo.
|
description: A type that represents an amiibo.
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
amiiboSeries:
|
amiiboSeries:
|
||||||
description: A name of the series the Amiibo belongs to.
|
description: A name of a series an amiibo belongs to.
|
||||||
type: string
|
type: string
|
||||||
character:
|
character:
|
||||||
description: |
|
description: |
|
||||||
A name of a character of An Amiibo.
|
A name of a character of an amiibo.
|
||||||
|
|
||||||
Multiple character have different amiibo design.
|
Multiple character have different amiibo design.
|
||||||
type: string
|
type: string
|
||||||
gameSeries:
|
gameSeries:
|
||||||
description: A name of the game series the Amiibo belongs to.
|
description: A name of a game series an amiibo belongs to.
|
||||||
type: string
|
type: string
|
||||||
games3DS:
|
games3DS:
|
||||||
description: A list of 3DS games an Amiibo could be used in, if any.
|
description: A list of 3DS games an amiibo could be used in, if any.
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/AmiiboGame'
|
$ref: '#/components/schemas/AmiiboGame'
|
||||||
gamesSwitch:
|
gamesSwitch:
|
||||||
description: A list of Switch games an Amiibo could be used in, if any.
|
description: A list of Switch games an amiibo could be used in, if any.
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/AmiiboGame'
|
$ref: '#/components/schemas/AmiiboGame'
|
||||||
gamesWiiU:
|
gamesWiiU:
|
||||||
description: A list of Wii U games an Amiibo could be used in, if any.
|
description: A list of Wii U games an amiibo could be used in, if any.
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/AmiiboGame'
|
$ref: '#/components/schemas/AmiiboGame'
|
||||||
head:
|
head:
|
||||||
description: |
|
description: |
|
||||||
The first 8 characters of the hexadecimal value that identifies an Amiibo.
|
The first 8 characters of the hexadecimal value that identifies an amiibo.
|
||||||
|
|
||||||
The positions 0 to 7 of the hexadecimal string.
|
The positions 0 to 7 of the hexadecimal string.
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 8
|
||||||
image:
|
image:
|
||||||
description: An image URL related to an Amiibo.
|
description: An image URL related to an amiibo.
|
||||||
type: string
|
type: string
|
||||||
|
format: uri
|
||||||
name:
|
name:
|
||||||
description: A name of an Amiibo.
|
description: A name of an Amiibo.
|
||||||
type: string
|
type: string
|
||||||
release:
|
release:
|
||||||
description: A type that contains the release dates of an Amiibo, if any.
|
description: A type that contains the release dates of an amiibo, if any.
|
||||||
$ref: '#/components/schemas/AmiiboRelease'
|
$ref: '#/components/schemas/AmiiboRelease'
|
||||||
tail:
|
tail:
|
||||||
description: |
|
description: |
|
||||||
The last 8 characters of the hexadecimal value that identifies an Amiibo.
|
The last 8 characters of the hexadecimal value that identifies an amiibo.
|
||||||
|
|
||||||
The positions 8 to 15 of the hexadecimal string.
|
The positions 8 to 15 of the hexadecimal string.
|
||||||
type: string
|
type: string
|
||||||
|
maxLength: 8
|
||||||
type:
|
type:
|
||||||
description: A name for the type an Amiibo belongs to.
|
description: A name for the type an amiibo belongs to.
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- amiiboSeries
|
- amiiboSeries
|
||||||
@@ -375,33 +388,27 @@ components:
|
|||||||
- tail
|
- tail
|
||||||
- type
|
- type
|
||||||
AmiiboGame:
|
AmiiboGame:
|
||||||
description: A type that represents a game in which an Amiibo is related to.
|
description: A type that represents a game in which an amiibo is related to.
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
amiiboUsage:
|
amiiboUsage:
|
||||||
description: A list of available usages an Amiibo have in a game, if any.
|
description: A list of available usages an amiibo have in a game, if any.
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/AmiiboUsage'
|
$ref: '#/components/schemas/AmiiboUsage'
|
||||||
gameID:
|
gameID:
|
||||||
description: A list of identifiers of a game an Amiibo is related to.
|
description: A list of identifiers of a game an amiibo is related to.
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
gameName:
|
gameName:
|
||||||
description: A name of a game an Amiibo is related to.
|
description: A name of a game an amiibo is related to.
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- gameID
|
- gameID
|
||||||
- gameName
|
- gameName
|
||||||
AmiiboList:
|
|
||||||
description: A type that contains a list of `Amiibo` instances.
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
description: A list if `Amiibo` instance.
|
|
||||||
$ref: '#/components/schemas/Amiibo'
|
|
||||||
AmiiboRelease:
|
AmiiboRelease:
|
||||||
description: A type that contains the release dates of an Amiibo throughout the world.
|
description: A type that contains the release dates of an amiibo throughout the world.
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
au:
|
au:
|
||||||
@@ -441,14 +448,14 @@ components:
|
|||||||
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
|
||||||
properties:
|
properties:
|
||||||
Usage:
|
Usage:
|
||||||
description: An explanation of the usage of an Amiibo in a game.
|
description: An explanation of the usage of an amiibo in a game.
|
||||||
type: string
|
type: string
|
||||||
write:
|
write:
|
||||||
description: A flag that indicates whether the data in an Amiibo is writable or not.
|
description: A flag that indicates whether the data in an amiibo is writable or not.
|
||||||
type: boolean
|
type: boolean
|
||||||
required:
|
required:
|
||||||
- Usage
|
- Usage
|
||||||
@@ -483,18 +490,6 @@ components:
|
|||||||
format: date-time
|
format: date-time
|
||||||
required:
|
required:
|
||||||
- lastUpdated
|
- lastUpdated
|
||||||
# Wrapper Entities
|
|
||||||
AmiiboWrapper:
|
|
||||||
description: A type that contains either one or multiple `Amiibo` instances.
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
amiibo:
|
|
||||||
description: A property that contains one or multiple `Amiibo` instances.
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/Amiibo'
|
|
||||||
- $ref: '#/components/schemas/AmiiboList'
|
|
||||||
required:
|
|
||||||
- amiibo
|
|
||||||
Tuple:
|
Tuple:
|
||||||
description: |
|
description: |
|
||||||
A type that is conformed only by the `key` and `name` properties.
|
A type that is conformed only by the `key` and `name` properties.
|
||||||
@@ -511,9 +506,11 @@ components:
|
|||||||
required:
|
required:
|
||||||
- key
|
- key
|
||||||
- name
|
- name
|
||||||
|
# List Entities
|
||||||
|
AmiiboList:
|
||||||
|
description: A type that contains a list of amiibos.
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
description: A list if `Amiibo` instance.
|
|
||||||
$ref: '#/components/schemas/Amiibo'
|
$ref: '#/components/schemas/Amiibo'
|
||||||
AmiiboSeriesList:
|
AmiiboSeriesList:
|
||||||
description: A type that represents a list of amiibo series.
|
description: A type that represents a list of amiibo series.
|
||||||
@@ -536,11 +533,14 @@ components:
|
|||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/GameSeries'
|
$ref: '#/components/schemas/GameSeries'
|
||||||
# Wrapper Entities
|
# Wrapper Entities
|
||||||
|
AmiiboWrapper:
|
||||||
|
description: A type that wraps either none, one or a list of amiibos.
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
amiibo:
|
amiibo:
|
||||||
description: A property that contains one or multiple `Amiibo` instances.
|
description: A container that have zero, one or more amiibos.
|
||||||
oneOf:
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
- $ref: '#/components/schemas/Amiibo'
|
- $ref: '#/components/schemas/Amiibo'
|
||||||
- $ref: '#/components/schemas/AmiiboList'
|
- $ref: '#/components/schemas/AmiiboList'
|
||||||
required:
|
required:
|
||||||
|
|||||||
Reference in New Issue
Block a user