Defined the GET /users/{username}/contributions endpoint for the Open API specification document in the library target.

This commit is contained in:
2025-10-15 23:55:43 +02:00
parent 8ee9f29f5c
commit 0d104ef173
+56 -1
View File
@@ -968,6 +968,47 @@ paths:
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
/users/{username}/contributions:
get:
tags:
- User Identity
summary: Get contributions of a user.
description: |
Retrieves all the contributions or additions to releases, labels, and artist done by username.
This endpoints accepts pagination headers.
operationId: getUserContributions
parameters:
- $ref: '#/components/parameters/Username'
- $ref: '#/components/parameters/SortField'
- $ref: '#/components/parameters/SortOrder'
responses:
'200':
description: Successfully retrieved items contributed 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'
submissions:
description: A type that represents all items submitted by a user.
$ref: '#/components/schemas/UserItems'
required:
- pagination
- contributions
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
/users/{username}/submissions:
get:
tags:
@@ -1217,11 +1258,25 @@ components:
in: query
schema:
type: string
SortField:
description: A filter by field.
name: sort
in: query
schema:
type: string
enum:
- label
- artist
- title
- catno
- format
- rating
- year
- added
SortOrder:
description: The order to sort the results.
name: sort_order
in: query
required: false
schema:
type: string
enum: