From ffcd8e6648bf3e440c98b122009a05e6be8f6746 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Thu, 9 Oct 2025 02:16:21 +0200 Subject: [PATCH] Implemented the GET /label/{label-id} endpoint for the Open API specification documentation in the library target. --- Sources/DiscogsService/openapi.yaml | 122 ++++++++++++++++++++++++++-- 1 file changed, 116 insertions(+), 6 deletions(-) diff --git a/Sources/DiscogsService/openapi.yaml b/Sources/DiscogsService/openapi.yaml index 563318fb4..df728f699 100644 --- a/Sources/DiscogsService/openapi.yaml +++ b/Sources/DiscogsService/openapi.yaml @@ -312,6 +312,24 @@ paths: $ref: '#/components/schemas/ArtistRelease' '404': $ref: '#/components/responses/NotFound' + /labels/{label_id}: + get: + tags: + - Database + summary: Get information about a label + description: Retrieves any available information for a specific label. + operationId: getLabel + parameters: + - $ref: '#/components/parameters/LabelId' + responses: + '200': + description: Successfully retrieved label details. + content: + application/json: + schema: + $ref: '#/components/schemas/Label' + '404': + $ref: '#/components/responses/NotFound' components: schemas: Artist: @@ -346,23 +364,23 @@ components: description: A detailed profile of an artist, if any. type: string urls: - description: A list of URLs related to an artist. + description: A list of URLs related to an artist, if any. type: array items: type: string format: uri namevariations: - description: A list of name variations related to an artist. + description: A list of name variations related to an artist, if any. type: array items: type: string members: - description: A list of artists related to an artist (in case of group). + description: A list of artists related to an artist (in case of group), if any. type: array items: - $ref: '#/components/schemas/ArtistID' + $ref: '#/components/schemas/ArtistId' images: - description: A list of images related to an artist. + description: A list of images related to an artist, if any. type: array items: $ref: '#/components/schemas/Image' @@ -376,7 +394,7 @@ components: - releases_url - resource_url - uri - ArtistID: + ArtistId: description: A type that references an artist. type: object properties: @@ -501,6 +519,91 @@ components: - uri - uri150 - width + Label: + description: A type that represents a label, company, recording studio, etc. + type: object + properties: + id: + description: An identifier of a label. + type: integer + readOnly: true + name: + description: A name of a label. + type: string + resource_url: + description: A URI resource of a label. + type: string + format: uri + readOnly: true + uri: + description: A URI representation of a label. + type: string + format: uri + readOnly: true + releases_url: + description: A URL to the releases of a label. + type: string + format: uri + profile: + description: A detailed profile of a label, if any. + type: string + contact_info: + description: A contact information of a label, if any. + type: string + parent_label: + description: A reference to a parent label of a label, if any. + $ref: '#/components/schemas/LabelId' + sublabels: + description: A list of sub-labels references of a label. + type: array + items: + $ref: '#/components/schemas/LabelId' + urls: + description: A list of URLs related to a label, if any. + type: array + items: + type: string + format: uri + images: + description: A list of images related to a label, if any. + type: array + items: + $ref: '#/components/schemas/Image' + data_quality: + description: An explanation for the data quality related to a label. + type: string + required: + - data_quality + - id + - name + - releases_url + - resource_url + - uri + LabelId: + description: A type that references a label. + type: object + properties: + id: + description: An identifier of a label. + type: integer + readOnly: true + name: + description: A name of a label. + type: string + resource_url: + description: A URI resource of a label. + type: string + format: uri + catno: + description: A category number of a label, if any. + type: string + entity_type: + description: An entity name of a label, if any. + type: string + required: + - id + - name + - resource_url Pagination: description: A type that provides details about a paginated result. type: object @@ -608,6 +711,13 @@ components: - year - title - format + LabelId: + description: An identifier of a label. + name: label_id + in: path + required: true + schema: + type: integer Page: description: A number of page of results to return. name: page