From cbc703a53f09b440e5369857c182ff775a628dee Mon Sep 17 00:00:00 2001 From: kong-apiops <122612077+kong-apiops@users.noreply.github.com> Date: Wed, 10 Jan 2024 08:40:07 +0000 Subject: [PATCH] Automated OAS update: openapi.yaml --- openapi.yaml | 124 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 103 insertions(+), 21 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index a3b3a53..bbfb342 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -253,14 +253,8 @@ paths: - portalAccessToken: [] /api/v2/applications/{applicationId}/product-versions/{productVersionId}/granted-scopes: get: - x-unstable: true summary: Get the granted scopes - description: >- - **Pre-release Endpoint** - - This endpoint is currently in beta and is subject to change. - - + description: > Retrieves the granted scopes of a specified application and product version directly from the IDP. @@ -279,8 +273,8 @@ paths: $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' - '409': - $ref: '#/components/responses/Conflict' + '422': + $ref: '#/components/responses/GetGrantedScopesProductVersion422Response' tags: - applications security: @@ -391,6 +385,31 @@ paths: - registrations security: - portalAccessToken: [] + /api/v2/applications/{applicationId}/registrations/{registrationId}/granted-scopes: + get: + summary: Get the granted scopes of an application registration + description: > + Retrieves the granted scopes of a specified product registration + directly from the IDP for an application. + + Will return 409 if this feature is not supported by the application. + operationId: get-application-registration-granted-scopes + parameters: + - $ref: '#/components/parameters/ApplicationId' + - $ref: '#/components/parameters/RegistrationId' + responses: + '200': + $ref: '#/components/responses/GetGrantedScopes' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableContent' + tags: + - registrations + security: + - portalAccessToken: [] /api/v2/developer: post: operationId: register @@ -1410,6 +1429,13 @@ components: example: Forbidden allOf: - $ref: '#/components/schemas/BaseError' + ApplicationAuthStrategyId: + description: >- + ID of the application auth strategy to use for the application. If null + or not included, the default application auth strategy will be used. + type: string + format: uuid + nullable: true CreateCredentialPayload: additionalProperties: false type: object @@ -1455,6 +1481,8 @@ components: redirect_uri: type: string nullable: true + application_auth_strategy_id: + $ref: '#/components/schemas/ApplicationAuthStrategyId' created_at: $ref: '#/components/schemas/CreatedAt' updated_at: @@ -1537,6 +1565,8 @@ components: description: A brief description of the application type: string maxLength: 255 + application_auth_strategy_id: + $ref: '#/components/schemas/ApplicationAuthStrategyId' ApplicationCreationResponse: additionalProperties: false type: object @@ -1549,6 +1579,7 @@ components: - description - created_at - updated_at + - application_auth_strategy_id properties: id: $ref: '#/components/schemas/UUID' @@ -1573,6 +1604,8 @@ components: type: string client_secret: type: string + application_auth_strategy_id: + $ref: '#/components/schemas/ApplicationAuthStrategyId' created_at: $ref: '#/components/schemas/CreatedAt' updated_at: @@ -1626,6 +1659,8 @@ components: type: string example: https://example.com/callback nullable: true + application_auth_strategy_id: + $ref: '#/components/schemas/ApplicationAuthStrategyId' created_at: $ref: '#/components/schemas/CreatedAt' updated_at: @@ -1862,6 +1897,21 @@ components: type: array items: type: string + UnprocessableContentError: + type: object + properties: + status: + example: 422 + title: + example: Unprocessable Content + type: + example: https://httpstatuses.com/422 + instance: + example: kong:trace:1234567891 + detail: + example: Unprocessable Content + allOf: + - $ref: '#/components/schemas/BaseError' AuthenticateRequest: type: object additionalProperties: false @@ -2468,8 +2518,6 @@ components: - parent_document_id - slug - title - - created_at - - updated_at properties: id: type: string @@ -2490,10 +2538,6 @@ components: type: string description: the title of the document example: Getting Started - created_at: - $ref: '#/components/schemas/CreatedAt' - updated_at: - $ref: '#/components/schemas/UpdatedAt' ListDocuments: type: object additionalProperties: false @@ -2517,8 +2561,6 @@ components: - slug - metadata - children - - created_at - - updated_at properties: id: type: string @@ -2544,10 +2586,6 @@ components: author: Jane Doe description: This is a description keywords: hello, world - created_at: - $ref: '#/components/schemas/CreatedAt' - updated_at: - $ref: '#/components/schemas/UpdatedAt' children: type: array items: @@ -3182,6 +3220,18 @@ components: application/json: schema: $ref: '#/components/schemas/GetGrantedScopesProductVersionResponse' + examples: + GetGrantedScopesProductVersion200Response: + $ref: '#/components/examples/GetGrantedScopesProductVersion200Response' + GetGrantedScopesProductVersion422Response: + description: Get granted with application using unsupported IDP. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/UnprocessableContentError' + examples: + GetGrantedScopesProductVersion422Example: + $ref: '#/components/examples/GetGrantedScopesProductVersion422Example' BadRequest: description: Bad Request content: @@ -3382,6 +3432,21 @@ components: application/json: schema: $ref: '#/components/schemas/ListRegistrationsResponse' + GetGrantedScopes: + description: Get granted scopes response. + content: + application/json: + schema: + $ref: '#/components/schemas/GetGrantedScopesResponse' + UnprocessableContent: + description: Unprocessable Content + content: + application/problem+json: + schema: + $ref: '#/components/schemas/UnprocessableContentError' + examples: + UnprocessableContentExample: + $ref: '#/components/examples/UnprocessableContentExample' SearchResponse: description: Search Results content: @@ -3588,6 +3653,17 @@ components: title: Forbidden instance: kong:trace:2723154947768991354 detail: You do not have permission to perform this action + GetGrantedScopesProductVersion200Response: + value: + scopes: + - openid + GetGrantedScopesProductVersion422Example: + value: + status: 422 + title: Unsupported IDP + type: https://kongapi.info/konnect/portal/granted-scopes-unavailable + detail: This feature is not supported by the application. + instance: kong:trace:2724154947768991354 NotFoundExample: value: status: 404 @@ -3661,6 +3737,12 @@ components: register: false view: true view_documentation: true + UnprocessableContentExample: + value: + status: 422 + title: Unprocessable Content + instance: kong:trace:8347343766220159419 + detail: The requested operation cannot be performed with the provided data SearchResponseExample: value: data: