Update descriptions and ID fields

This commit is contained in:
Ciarán Ainsworth 2023-11-16 17:39:29 +01:00
parent b4762a921b
commit f412fee577
No known key found for this signature in database
3 changed files with 138 additions and 60 deletions

View File

@ -204,14 +204,6 @@ paths:
description: Filter releases by artist description: Filter releases by artist
schema: schema:
type: integer type: integer
- name: id
in: query
required: false
description: Filter releases by ID
schema:
type: array
items:
type: string
- name: collection - name: collection
in: query in: query
required: false required: false
@ -265,6 +257,41 @@ paths:
$ref: "#/components/schemas/SimpleRelease" $ref: "#/components/schemas/SimpleRelease"
"401": "401":
$ref: "#/components/responses/Unauthorized" $ref: "#/components/responses/Unauthorized"
/api/v2/release-groups:
get:
tags:
- Releases
summary: "Retrieve a list of release groups"
description: "Retrieve a list of all release groups on the server"
operationId: getReleaseGroups
parameters:
- $ref: "#/components/parameters/query"
- $ref: "#/components/parameters/pageParam"
- $ref: "#/components/parameters/pageSizeParam"
- name: primary_type
in: query
required: false
description: "Filter results by their primary type"
schema:
type: array
items:
$ref: "#/components/schemas/ReleaseTypeEnum"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/Pagination"
- type: object
required:
- results
properties:
results:
type: array
items:
$ref: "#/components/schemas/ReleaseGroup"
/api/v2/tags/podcasts: /api/v2/tags/podcasts:
get: get:
tags: tags:
@ -634,9 +661,11 @@ components:
guid: guid:
type: string type: string
format: uuid format: uuid
description: "The globally unique ID of the listening object"
createdDate: createdDate:
type: string type: string
format: date-time format: date-time
description: "The date on which the listening was recorded"
recording: recording:
$ref: "#/components/schemas/SimpleRecording" $ref: "#/components/schemas/SimpleRecording"
user: user:
@ -693,7 +722,18 @@ components:
allOf: allOf:
- $ref: "#/components/schemas/SimpleRelease" - $ref: "#/components/schemas/SimpleRelease"
- type: object - type: object
required:
- artistCredit
- creationDate
- recordingCount
- duration
- attributedTo
- local
- releaseGroup
- recordings
properties: properties:
artistCredit:
$ref: "specs/multi-artist/schema.yml#/ArtistCredit"
creationDate: creationDate:
type: string type: string
format: date-time format: date-time
@ -708,26 +748,25 @@ components:
$ref: "#/components/schemas/SimpleActor" $ref: "#/components/schemas/SimpleActor"
local: local:
type: boolean type: boolean
releaseGroup:
$ref: "#/components/schemas/SimpleReleaseGroup"
recordings: recordings:
type: array type: array
items: items:
$ref: "#/components/schemas/SimpleRecording" $ref: "#/components/schemas/SimpleRecording"
ReleaseGroup: ReleaseGroup:
type: object allOf:
- $ref: "#/components/schemas/SimpleReleaseGroup"
- type: object
required: required:
- guid - guid
- artist - artist
- primaryType - releases
properties: properties:
guid:
type: string
format: uuid
artistCredit: artistCredit:
type: array type: array
items: items:
$ref: "specs/multi-artist/schema.yml#/ArtistCredit" $ref: "specs/multi-artist/schema.yml#/ArtistCredit"
primaryType:
$ref: "#/components/schemas/ReleaseTypeEnum"
secondaryType: secondaryType:
type: string type: string
enum: enum:
@ -750,7 +789,7 @@ components:
ReleaseTypeEnum: ReleaseTypeEnum:
type: string type: string
default: album default: album
description: The type of release description: "The type of release"
enum: enum:
- album - album
- single - single
@ -815,7 +854,7 @@ components:
SimpleRecording: SimpleRecording:
type: object type: object
required: required:
- id - guid
- fid - fid
- name - name
- playable - playable
@ -824,8 +863,9 @@ components:
- artist - artist
- cover - cover
properties: properties:
id: guid:
type: integer type: string
format: uuid
fid: fid:
type: string type: string
format: url format: url
@ -846,13 +886,14 @@ components:
SimpleRelease: SimpleRelease:
type: object type: object
required: required:
- id - guid
- fid - fid
- name - name
- local - local
properties: properties:
id: guid:
type: integer type: string
format: uuid
fid: fid:
type: string type: string
format: url format: url
@ -863,21 +904,36 @@ components:
type: string type: string
playable: playable:
type: boolean type: boolean
releaseGroup:
type: string
format: uuid
cover: cover:
$ref: "#/components/schemas/CoverUrls" $ref: "#/components/schemas/CoverUrls"
SimpleReleaseGroup:
type: object
required:
- guid
- primaryType
properties:
guid:
type: string
format: uuid
description: "The unique identifier of the release group"
name:
type: string
primaryType:
$ref: "#/components/schemas/ReleaseTypeEnum"
releaseVersions:
type: integer
description: "The number of releases associated with this release group"
SimpleUser: SimpleUser:
type: object type: object
required: required:
- id - guid
- username - username
- fullUsername - fullUsername
- avatar - avatar
properties: properties:
id: guid:
type: integer type: string
format: uuid
username: username:
type: string type: string
fullUsername: fullUsername:

View File

@ -9,16 +9,25 @@ SimpleCollection:
guid: guid:
type: string type: string
format: uuid format: uuid
description: "The globally unique ID of the collection"
name: name:
type: string type: string
description: "The user-defined name of the collection"
local: local:
type: boolean type: boolean
description: "Whether the collection is hosted on the server the request is made against"
owner: owner:
$ref: "../../schema.yml#/components/schemas/SimpleActor" $ref: "../../schema.yml#/components/schemas/SimpleActor"
Collection: Collection:
allOf: allOf:
- $ref: "#/SimpleCollection" - $ref: "#/SimpleCollection"
- type: object - type: object
required:
- items
properties: properties:
description:
type: string
description: "The user-defined description of the collection"
items: items:
type: integer type: integer
description: "The total number of items in the collection"

View File

@ -1,14 +1,16 @@
SimpleArtist: SimpleArtist:
type: object type: object
required: required:
- id - guid
- fid - fid
- name - name
- contentCategory - contentCategory
- local - local
properties: properties:
id: guid:
type: integer type: string
format: uuid
description: "The globally unique ID of the artist"
fid: fid:
type: string type: string
format: url format: url
@ -32,16 +34,23 @@ Artist:
allOf: allOf:
- $ref: "#/SimpleArtist" - $ref: "#/SimpleArtist"
- type: object - type: object
required:
- creationDate
- recordingCount
- releases
properties: properties:
creationDate: creationDate:
type: string type: string
format: date-time format: date-time
description: "The date on which the artist was added to the server"
recordingCount: recordingCount:
type: integer type: integer
description: "The number of recordings credited to the artist"
tags: tags:
type: array type: array
items: items:
type: string type: string
description: "Any tags associated with the artist"
releases: releases:
type: array type: array
items: items:
@ -54,7 +63,11 @@ ArtistCredit:
properties: properties:
name: name:
type: string type: string
id: description: "The name of the artist"
type: integer guid:
type: string
format: uuid
description: "The globally unique ID of the artist"
joinPhrase: joinPhrase:
type: string type: string
description: "The phrase used to join this artist's name in the credits. For example: 'feat', '&', '+'"