Defined the GET /oauth/identity endpoints on the OpenAPI specification document in the library target.

This commit is contained in:
2025-10-13 19:43:25 +02:00
parent 4511a6e49c
commit c0bf811d37
+37
View File
@@ -333,6 +333,34 @@ paths:
$ref: '#/components/headers/OAuthSecret'
'500':
$ref: '#/components/responses/InternalError'
/oauth/identity:
get:
tags:
- Authentication
summary: Get information about an authenticated user.
description: |
Retrieve basic information about the authenticated user.
This endpoint represents the (optional) [5th step of the OAuth flow process](https://www.discogs.com/developers#header-5-send-authenticated-requests-to-discogs-endpoints), as it is advised to perform a sanity check to ensure the *OAuth* process finished successfully.
For further details about this process, please refer to the [OAuth flow](https://www.discogs.com/developers#page:authentication,header:authentication-oauth-flow) section in the [Discogs API authentication](https://www.discogs.com/developers#page:authentication) documentation.
operationId: getUserIdentity
responses:
'200':
description: Successfully retrieved information about an authenticated 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:
$ref: '#/components/schemas/UserIdentity'
'401':
$ref: '#/components/responses/Unauthorized'
/artists/{artist_id}:
get:
tags:
@@ -2044,6 +2072,15 @@ components:
- id
- resource_url
- username
UserIdentity:
description: A type that represents a user identity.
allOf:
- $ref: '#/components/schemas/UserId'
- type: object
properties:
consumer_name:
description: A name of an application a user utilizes to interacts with the service.
type: string
Video:
description: A type that represents a video.
type: object