Implemented the GET /artists/{artist-id} endpoint for the Open API specification documentation in the library target.
This commit is contained in:
@@ -245,11 +245,11 @@ tags:
|
|||||||
paths:
|
paths:
|
||||||
/:
|
/:
|
||||||
get:
|
get:
|
||||||
tags:
|
summary: Get information about the service.
|
||||||
- Service
|
|
||||||
summary: Get service information.
|
|
||||||
description: Retrieves any available information related to the service.
|
description: Retrieves any available information related to the service.
|
||||||
operationId: getService
|
operationId: getService
|
||||||
|
tags:
|
||||||
|
- Service
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Service information returned successfully.
|
description: Service information returned successfully.
|
||||||
@@ -259,8 +259,161 @@ paths:
|
|||||||
$ref: '#/components/schemas/Service'
|
$ref: '#/components/schemas/Service'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/Unavailable'
|
$ref: '#/components/responses/Unavailable'
|
||||||
|
/artists/{artist_id}:
|
||||||
|
get:
|
||||||
|
summary: Get information about an artist.
|
||||||
|
operationId: getArtist
|
||||||
|
description: Retrieves any available information for a specific artist.
|
||||||
|
tags:
|
||||||
|
- Database
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/ArtistId'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successfully retrieved artist details.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Artist'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/NotFound'
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
|
Artist:
|
||||||
|
description: A type that represents an artist or a group.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
description: An identifier of an artist.
|
||||||
|
type: integer
|
||||||
|
readOnly: true
|
||||||
|
name:
|
||||||
|
description: A name of an artist.
|
||||||
|
type: string
|
||||||
|
realname:
|
||||||
|
description: A real name of an artist, if any.
|
||||||
|
type: string
|
||||||
|
resource_url:
|
||||||
|
description: A URI resource of an artist.
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
readOnly: true
|
||||||
|
uri:
|
||||||
|
description: A URI representation of an artist.
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
readOnly: true
|
||||||
|
releases_url:
|
||||||
|
description: A URL to the releases of an artist.
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
profile:
|
||||||
|
description: A detailed profile of an artist, if any.
|
||||||
|
type: string
|
||||||
|
urls:
|
||||||
|
description: A list of URLs related to an artist.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
namevariations:
|
||||||
|
description: A list of name variations related to an artist.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
members:
|
||||||
|
description: A list of artists related to an artist (in case of group).
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/ArtistID'
|
||||||
|
images:
|
||||||
|
description: A list of images related to an artist.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Image'
|
||||||
|
data_quality:
|
||||||
|
description: An explanation for the data quality related to an artist.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- data_quality
|
||||||
|
- id
|
||||||
|
- name
|
||||||
|
- releases_url
|
||||||
|
- resource_url
|
||||||
|
- uri
|
||||||
|
ArtistID:
|
||||||
|
description: A type that references an artist.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
description: An identifier of an artist.
|
||||||
|
type: integer
|
||||||
|
readOnly: true
|
||||||
|
name:
|
||||||
|
description: A name of an artist.
|
||||||
|
type: string
|
||||||
|
resource_url:
|
||||||
|
description: A URI resource of an artist.
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
readOnly: true
|
||||||
|
active:
|
||||||
|
description: A flag that indicates whether the relation is currently active or not.
|
||||||
|
type: boolean
|
||||||
|
anv:
|
||||||
|
description: TBD
|
||||||
|
type: string
|
||||||
|
join:
|
||||||
|
description: TBD
|
||||||
|
type: string
|
||||||
|
role:
|
||||||
|
description: TBD
|
||||||
|
type: string
|
||||||
|
tracks:
|
||||||
|
description: TBD
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- active
|
||||||
|
- id
|
||||||
|
- name
|
||||||
|
- resource_url
|
||||||
|
Image:
|
||||||
|
description: A type that represents an image of a resource.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
description: A type of an image.
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- primary
|
||||||
|
- secondary
|
||||||
|
uri:
|
||||||
|
description: A URI representation of an image.
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
readOnly: true
|
||||||
|
resource_url:
|
||||||
|
description: A URI resource of an image.
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
readOnly: true
|
||||||
|
uri150:
|
||||||
|
description: TBD
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
width:
|
||||||
|
description: A width of an image (in pixels).
|
||||||
|
type: integer
|
||||||
|
height:
|
||||||
|
description: A height of an image (in pixels).
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- height
|
||||||
|
- resource_url
|
||||||
|
- type
|
||||||
|
- uri
|
||||||
|
- uri150
|
||||||
|
- width
|
||||||
Service:
|
Service:
|
||||||
description: A type that encapsulates any available information about the service.
|
description: A type that encapsulates any available information about the service.
|
||||||
type: object
|
type: object
|
||||||
@@ -306,7 +459,24 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- message
|
- message
|
||||||
|
parameters:
|
||||||
|
ArtistId:
|
||||||
|
name: artist_id
|
||||||
|
description: An identifier of an artist.
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 108713
|
||||||
responses:
|
responses:
|
||||||
|
NotFound:
|
||||||
|
description: A requested resource cannot be found.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ServiceError'
|
||||||
|
example:
|
||||||
|
message: Resource not found.
|
||||||
Unavailable:
|
Unavailable:
|
||||||
description: The service is currently unavailable to handle requests.
|
description: The service is currently unavailable to handle requests.
|
||||||
content:
|
content:
|
||||||
|
|||||||
Reference in New Issue
Block a user