From ddc91a0c644159cd174eeb707c1e93bb28d82489 Mon Sep 17 00:00:00 2001 From: kong-apiops <122612077+kong-apiops@users.noreply.github.com> Date: Fri, 8 Dec 2023 09:24:09 +0000 Subject: [PATCH] Automated OAS update: openapi.yaml --- openapi.yaml | 561 ++++++++++++++++++++++++--------------------------- 1 file changed, 269 insertions(+), 292 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index a3b3a53..f3693e1 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 @@ -1862,6 +1881,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 +2502,6 @@ components: - parent_document_id - slug - title - - created_at - - updated_at properties: id: type: string @@ -2490,10 +2522,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 @@ -2515,10 +2543,8 @@ components: - id - title - slug - - metadata + - meta - children - - created_at - - updated_at properties: id: type: string @@ -2537,17 +2563,13 @@ components: type: string description: the slug of the document example: getting-started - metadata: + meta: type: object description: the metadata of the document example: 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: @@ -2570,206 +2592,161 @@ components: enum: - application/json - application/vnd.konnect.document-nodes+json - NodeChildren: - description: List of children nodes of the current node - type: array - items: - $ref: '#/components/schemas/ChildNode' - HeadingBlock: + BaseNode: type: object required: - type properties: type: type: string - enum: - - heading - level: - description: Level of the heading which maps to HTML tag - type: number - minimum: 1 - maximum: 6 - children: - $ref: '#/components/schemas/NodeChildren' + DocumentBlock: + allOf: + - $ref: '#/components/schemas/BlockNode' + - type: object + properties: + version: + type: string + description: content of the document + example: + type: doc + content: + - type: paragraph + content: + - type: text + text: Hello World + BlockNode: + allOf: + - $ref: '#/components/schemas/BaseNode' + - type: object + properties: + children: + description: List of children nodes of the current node + type: array + items: + $ref: '#/components/schemas/AnyNode' + HeadingBlock: + allOf: + - $ref: '#/components/schemas/BlockNode' + - type: object + properties: + level: + description: Level of the heading which maps to HTML tag + type: number + minimum: 1 + maximum: 6 BlockQuoteBlock: - type: object - required: - - type - properties: - type: - type: string - enum: - - blockquote - children: - $ref: '#/components/schemas/NodeChildren' + allOf: + - $ref: '#/components/schemas/BlockNode' ParagraphBlock: - type: object - required: - - type - properties: - type: - type: string - enum: - - paragraph - children: - $ref: '#/components/schemas/NodeChildren' + allOf: + - $ref: '#/components/schemas/BlockNode' TextBlock: - type: object - required: - - type - properties: - type: - type: string - enum: - - text_block - children: - $ref: '#/components/schemas/NodeChildren' + allOf: + - $ref: '#/components/schemas/BlockNode' BreakBlock: - type: object - required: - - type - properties: - type: - type: string - enum: - - break - children: - $ref: '#/components/schemas/NodeChildren' + allOf: + - $ref: '#/components/schemas/BlockNode' CodeBlock: - type: object - required: - - type - properties: - type: - type: string - enum: - - code_block - lang: - type: string - children: - $ref: '#/components/schemas/NodeChildren' + allOf: + - $ref: '#/components/schemas/BlockNode' + - type: object + properties: + lang: + type: string ListBlock: - type: object - required: - - type - properties: - type: - type: string - enum: - - list - isOrdered: - description: Defines if the list is ordered or not - type: boolean - children: - $ref: '#/components/schemas/NodeChildren' + allOf: + - $ref: '#/components/schemas/BlockNode' + - type: object + properties: + isOrdered: + description: Defines if the list is ordered or not + type: boolean ListItemBlock: - type: object - required: - - type - properties: - type: - type: string - enum: - - list_item - children: - $ref: '#/components/schemas/NodeChildren' + allOf: + - $ref: '#/components/schemas/BlockNode' Text: - type: object - required: - - type - properties: - type: - type: string - enum: - - text - text: - type: string - hardBreak: - description: | - If this property is true the end of this block should - be a carriage return and not concatenated to the next Text block. - type: boolean - softBreak: - description: | - If this property is true the end of this block should should be - concatenated with a space caracter before the next block. This is - the flag showing that the parsed markdown block was at the end of - the line. - type: boolean - children: - $ref: '#/components/schemas/NodeChildren' + allOf: + - $ref: '#/components/schemas/BaseNode' + - $ref: '#/components/schemas/BlockNode' + - type: object + properties: + text: + type: string + hardBreak: + description: > + If this property is true the end of this block should + + be a carriage return and not concatenated to the next Text + block. + type: boolean + softBreak: + description: > + If this property is true the end of this block should should be + + concatenated with a space caracter before the next block. This + is + + the flag showing that the parsed markdown block was at the end + of + + the line. + type: boolean Emphasis: - type: object - required: - - type - properties: - type: - type: string - enum: - - emphasis - level: - type: number - minimum: 1 - maximum: 2 - description: | - Level of emphasis - 1 - italic - 2 - bold - children: - $ref: '#/components/schemas/NodeChildren' + allOf: + - $ref: '#/components/schemas/BaseNode' + - $ref: '#/components/schemas/BlockNode' + - type: object + properties: + level: + type: number + minimum: 1 + maximum: 2 + description: | + Level of emphasis + 1 - italic + 2 - bold Code: - type: object - required: - - type - properties: - type: - type: string - enum: - - code - children: - $ref: '#/components/schemas/NodeChildren' + allOf: + - $ref: '#/components/schemas/BaseNode' + - $ref: '#/components/schemas/BlockNode' Link: - type: object - required: - - type - properties: - type: - type: string - enum: - - link - href: - description: Target url of the link - type: string - title: - description: Title of the link - type: string + allOf: + - $ref: '#/components/schemas/BaseNode' + - type: object + properties: + href: + description: Target url of the link + type: string + title: + description: Title of the link + type: string Image: - type: object - required: - - type - properties: - type: - type: string - enum: - - image - url: - description: Url of the image - type: string - alt: - description: Alternate tag of the image - type: string - title: - description: Title of the image - type: string + allOf: + - $ref: '#/components/schemas/BaseNode' + - type: object + properties: + url: + description: Url of the image + type: string + alt: + description: Alternate tag of the image + type: string + title: + description: Title of the image + type: string StrikeThrough: - type: object - required: - - type - properties: - type: - type: string - enum: - - strikethrough + allOf: + - $ref: '#/components/schemas/BaseNode' + TaskCheckbox: + allOf: + - $ref: '#/components/schemas/BaseNode' + - type: object + properties: + checked: + type: boolean + description: State of the checkbox + required: + - checked AlignmentKind: type: string enum: @@ -2778,81 +2755,37 @@ components: - center - none TableAlignments: - type: array - nullable: true - items: - $ref: '#/components/schemas/AlignmentKind' - TableBlock: type: object - required: - - type - - alignments properties: - type: - type: string - enum: - - table alignments: - $ref: '#/components/schemas/TableAlignments' - children: - $ref: '#/components/schemas/NodeChildren' - TableHeaderBlock: - type: object + type: array + nullable: true + items: + $ref: '#/components/schemas/AlignmentKind' required: - - type - alignments - properties: - type: - type: string - enum: - - table_header - alignments: - $ref: '#/components/schemas/TableAlignments' - children: - $ref: '#/components/schemas/NodeChildren' + TableBlock: + allOf: + - $ref: '#/components/schemas/BlockNode' + - $ref: '#/components/schemas/TableAlignments' + TableHeaderBlock: + allOf: + - $ref: '#/components/schemas/BlockNode' + - $ref: '#/components/schemas/TableAlignments' TableCellBlock: - type: object - required: - - type - properties: - type: - type: string - enum: - - table_cell - alignment: - $ref: '#/components/schemas/AlignmentKind' - children: - $ref: '#/components/schemas/NodeChildren' + allOf: + - $ref: '#/components/schemas/BlockNode' + - type: object + properties: + alignment: + $ref: '#/components/schemas/AlignmentKind' TableRowBlock: - type: object - required: - - type - - alignments - properties: - type: - type: string - enum: - - table_row - alignments: - $ref: '#/components/schemas/TableAlignments' - children: - $ref: '#/components/schemas/NodeChildren' - TaskCheckbox: - type: object - required: - - checked - - type - properties: - type: - type: string - enum: - - task_checkbox - checked: - type: boolean - description: State of the checkbox - ChildNode: - type: object + allOf: + - $ref: '#/components/schemas/BlockNode' + - $ref: '#/components/schemas/TableAlignments' + AnyNode: oneOf: + - $ref: '#/components/schemas/DocumentBlock' - $ref: '#/components/schemas/HeadingBlock' - $ref: '#/components/schemas/BlockQuoteBlock' - $ref: '#/components/schemas/ParagraphBlock' @@ -2874,27 +2807,27 @@ components: - $ref: '#/components/schemas/TaskCheckbox' discriminator: propertyName: type - DocumentBlock: - type: object - required: - - type - properties: - type: - type: string - enum: - - document - version: - type: string - children: - $ref: '#/components/schemas/NodeChildren' - description: content of the document - example: - type: document - content: - - type: paragraph - content: - - type: text - text: Hello World + mapping: + document: '#/components/schemas/DocumentBlock' + heading: '#/components/schemas/HeadingBlock' + blockquote: '#/components/schemas/BlockQuoteBlock' + paragraph: '#/components/schemas/ParagraphBlock' + text_block: '#/components/schemas/TextBlock' + break: '#/components/schemas/BreakBlock' + code_block: '#/components/schemas/CodeBlock' + list: '#/components/schemas/ListBlock' + list_item: '#/components/schemas/ListItemBlock' + text: '#/components/schemas/Text' + emphasis: '#/components/schemas/Emphasis' + code: '#/components/schemas/Code' + link: '#/components/schemas/Link' + image: '#/components/schemas/Image' + strikethrough: '#/components/schemas/StrikeThrough' + task_checkbox: '#/components/schemas/TaskCheckbox' + table: '#/components/schemas/TableBlock' + table_header: '#/components/schemas/TableHeaderBlock' + table_cell: '#/components/schemas/TableCellBlock' + table_row: '#/components/schemas/TableRowBlock' NotAvailableError: allOf: - $ref: '#/components/schemas/BaseError' @@ -3182,6 +3115,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 +3327,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 +3548,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 +3632,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: