From c0bf811d373b23e3d24ca3b102213ed376d5ed06 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Mon, 13 Oct 2025 19:43:25 +0200 Subject: [PATCH] Defined the GET /oauth/identity endpoints on the OpenAPI specification document in the library target. --- Sources/DiscogsService/openapi.yaml | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Sources/DiscogsService/openapi.yaml b/Sources/DiscogsService/openapi.yaml index 02d569f9b..92ca0500f 100644 --- a/Sources/DiscogsService/openapi.yaml +++ b/Sources/DiscogsService/openapi.yaml @@ -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