From 194dd035d141424e3a5ec598811d4e686a57bb88 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Thu, 16 Oct 2025 02:08:22 +0200 Subject: [PATCH] Implemented the GET /users/{username}/collection/folders/{folder_id}/releases endpoint for the Open API specification document in the library target. --- Sources/DiscogsService/openapi.yaml | 71 +++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git a/Sources/DiscogsService/openapi.yaml b/Sources/DiscogsService/openapi.yaml index 064a24a17..66caee425 100644 --- a/Sources/DiscogsService/openapi.yaml +++ b/Sources/DiscogsService/openapi.yaml @@ -1247,17 +1247,65 @@ paths: get: tags: - User Collection - summary: Get information about collection folders of a user that contains a given release. + summary: Get collection items of a user that contains a given release. description: | Views those collection folder of a user which contain a specified release. This will also show information about each release instance. > important: A given `release_id` must not be `0`. This endpoint requires authentication as the collection owner only in case the collection is private. - operationId: getCollectionRelease + operationId: getCollectionItemsByRelease parameters: - $ref: '#/components/parameters/Username' - $ref: '#/components/parameters/ReleaseId' + responses: + '200': + description: Successfully retrieved a list of collection items that contains a specified release. + headers: + X-Discogs-RateLimit: + $ref: '#/components/headers/RateLimit' + X-Discogs-RateLimit-Used: + $ref: '#/components/headers/RateLimitUsed' + X-Discogs-RateLimit-Remaining: + $ref: '#/components/headers/RateLimitRemaining' + content: + application/json: + schema: + type: object + properties: + pagination: + $ref: '#/components/schemas/Pagination' + releases: + description: A list of collection folders of a user that contains a specified release. + type: array + items: + $ref: '#/components/schemas/ReleaseInFolder' + required: + - pagination + - releases + '403': + $ref: '#/components/responses/NotAccessable' + '404': + $ref: '#/components/responses/NotFound' + '500': + $ref: '#/components/responses/InternalError' + /users/{username}/collection/folders/{folder_id}/releases: + get: + tags: + - User Collection + summary: Get collection items of a user inside a specified folder. + description: | + Returns the list of item in a specified collection folder of a user. + + Basic information about each release is provided, suitable for display in a list. For detailed information, make another API call to fetch the corresponding release. + + This endpoint provides pagination parameters and also, requires authentication as an owner of a collection only in case the `folder_id` is not `0`, or the collection has been made private by its owner. Otherwise, only public notes fields will be visible. + operationId: getCollectionItemsByFolder + parameters: + - $ref: '#/components/parameters/Username' + - $ref: '#/components/parameters/FolderId' + - $ref: '#/components/parameters/SortField' + - $ref: '#/components/parameters/SortOrder' responses: '200': description: Successfully retrieved a specific collection folder of a @@ -1276,7 +1324,7 @@ paths: pagination: $ref: '#/components/schemas/Pagination' releases: - description: A list of collection folders of a user that contains a specified release. + description: A list of collection folders of a user that contains a type: array items: $ref: '#/components/schemas/ReleaseInFolder' @@ -2258,6 +2306,23 @@ components: basic_information: description: The available information about a release that was added into a collection folder of a user. $ref: '#/components/schemas/Release' + notes: + description: A list of additional notes related to a release in a collection folder of a user. + type: array + items: + description: A type that represents a note about a release in a collection folder of a user. + type: object + properties: + field_id: + description: An identifier of a custom field. + type: integer + readOnly: true + value: + description: A value assigned to a custom field. + type: string + required: + - field_id + - value required: - basic_information - id