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

This commit is contained in:
2025-10-15 22:52:38 +02:00
parent d9f23e29c3
commit 8ee9f29f5c
+58 -3
View File
@@ -968,6 +968,45 @@ paths:
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
/users/{username}/submissions:
get:
tags:
- User Identity
summary: Get submissions of a user.
description: |
Retrieves all the submissions or edits to releases, labels, and artist done by username.
This endpoints accepts pagination headers.
operationId: getUserSubmissions
parameters:
- $ref: '#/components/parameters/Username'
responses:
'200':
description: Successfully retrieved items submitted 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 edited by a user.
$ref: '#/components/schemas/UserItems'
required:
- pagination
- submissions
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
components:
headers:
Link:
@@ -1863,9 +1902,7 @@ components:
- status
- styles
- title
- tracklist
- uri
- videos
ReleaseFormat:
description: A type that represents a format of a release.
type: object
@@ -2182,7 +2219,6 @@ components:
type: string
format: uri
required:
- id
- resource_url
- username
UserIdentity:
@@ -2194,6 +2230,25 @@ components:
consumer_name:
description: A name of an application a user utilizes to interacts with the service.
type: string
UserItems:
description: A type that represents all items added and/or edited by a user.
type: object
properties:
artists:
description: A list of artists added and/or edited by a user.
type: array
items:
$ref: '#/components/schemas/Artist'
labels:
description: A list of labels added and/or edited by a user.
type: array
items:
$ref: '#/components/schemas/Label'
releases:
description: A list of releases added and/or edited by a user.
type: array
items:
$ref: '#/components/schemas/Release'
UserProfile:
description: A type that represents a user profile.
allOf: