From 782ce0ff544c03fbd393f74de46405fc6effefa8 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Thu, 9 Oct 2025 02:27:37 +0200 Subject: [PATCH] Implemented the GET /label/{label-id}/releases endpoint for the Open API specification documentation in the library target. --- Sources/DiscogsService/openapi.yaml | 77 +++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/Sources/DiscogsService/openapi.yaml b/Sources/DiscogsService/openapi.yaml index df728f699..60a8ad373 100644 --- a/Sources/DiscogsService/openapi.yaml +++ b/Sources/DiscogsService/openapi.yaml @@ -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