diff --git a/Sources/DiscogsService/openapi.yaml b/Sources/DiscogsService/openapi.yaml index 82cd8b42a..af67bf66f 100644 --- a/Sources/DiscogsService/openapi.yaml +++ b/Sources/DiscogsService/openapi.yaml @@ -1060,6 +1060,47 @@ paths: $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' + /users/{username}/collection/folders: + get: + tags: + - User Collection + summary: Get collection folder of a user. + description: | + Retrieves a list of folders in a collection of a user. + + In case the collection has been made private by its owner, authentication as the collection owner is required. Otherwise, only folder `ID 0`` (the “All” folder) will be visible only if the requested collection of a user is public. + operationId: getUserCollectionFolders + parameters: + - $ref: '#/components/parameters/Username' + responses: + '200': + description: Successfully retrieved all the collection folders by a user. + 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' + folders: + description: A list of collection folders of a user. + type: array + items: + $ref: '#/components/schemas/Folder' + required: + - pagination + - folders + '404': + $ref: '#/components/responses/NotFound' + '500': + $ref: '#/components/responses/InternalError' components: headers: Link: @@ -1558,6 +1599,30 @@ components: - NZD - SEK - ZAR + Folder: + description: A type that represents a collection folder of a user. + type: object + properties: + id: + description: An identifier of a collection folder. + type: integer + readOnly: true + name: + description: A name of a collection folder. + type: string + count: + description: A number of items a collection folder contains. + type: integer + resource_url: + description: A URI resource of a collection folder. + type: string + format: uri + readOnly: true + required: + - count + - id + - name + - resource_url Identifier: description: A type that represents an identifier. type: object