Implemented the GET /label/{label-id}/releases endpoint for the Open API specification documentation in the library target.

This commit is contained in:
2025-10-09 02:27:37 +02:00
parent ffcd8e6648
commit 782ce0ff54
+77
View File
@@ -330,6 +330,39 @@ paths:
$ref: '#/components/schemas/Label'
'404':
$ref: '#/components/responses/NotFound'
/labels/{label_id}/releases:
get:
tags:
- Database
summary: Get information about the releases of a label.
description: |
Returns a list of releases associated with a label.
This endpoint Supports pagination.
operationId: getLabelReleases
parameters:
- $ref: '#/components/parameters/LabelId'
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/PerPage'
responses:
'200':
description: A paginated list of the label's releases.
headers:
Link:
$ref: '#/components/headers/Link'
content:
application/json:
schema:
type: object
properties:
pagination:
$ref: '#/components/schemas/Pagination'
releases:
type: array
items:
$ref: '#/components/schemas/LabelRelease'
'404':
$ref: '#/components/responses/NotFound'
components:
schemas:
Artist:
@@ -604,6 +637,50 @@ components:
- id
- name
- resource_url
LabelRelease:
description: A type that represents a release of a label.
type: object
properties:
id:
description: An identifier of a release.
type: integer
readOnly: true
resource_url:
description: A URI resource of a release.
type: string
format: uri
thumb:
description: A URL link to a thumbnail of a release.
type: string
format: uri
artist:
description: A name for the artist of a release.
type: string
title:
description: A title of a release.
type: string
format:
description: A format of a release.
type: string
catno:
description: A category number of a release.
type: string
status:
description: A status of a release.
type: string
year:
description: A number of year of a release.
type: integer
required:
- artist
- catno
- format
- id
- resource_url
- status
- title
- thumb
- year
Pagination:
description: A type that provides details about a paginated result.
type: object