From 8097c90b1fb40f5791e54a63ca71d5b846843b0f Mon Sep 17 00:00:00 2001 From: kong-apiops <122612077+kong-apiops@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:06:37 +0100 Subject: [PATCH] feat(sdk): automated oas update --- .../control-planes-config.yaml | 147 ++++++++++++------ .../Konnect/v0/yaml/mesh-control-planes.yaml | 2 +- api-specs/Konnect/v1/yaml/ksearch.yaml | 2 +- api-specs/Konnect/v2/yaml/api-products.yaml | 28 +++- .../v2/yaml/application-auth-strategies.yaml | 4 +- api-specs/Konnect/v2/yaml/audit-logs.yaml | 2 +- api-specs/Konnect/v2/yaml/control-planes.yaml | 37 ++++- .../Konnect/v2/yaml/portal-management.yaml | 28 +++- api-specs/Konnect/v3/yaml/identity.yaml | 92 ++++++++++- api-specs/portal.yaml | 31 +++- 10 files changed, 307 insertions(+), 66 deletions(-) diff --git a/api-specs/Konnect/control-planes-config/control-planes-config.yaml b/api-specs/Konnect/control-planes-config/control-planes-config.yaml index 79b5625326b6..cf313a4cd977 100644 --- a/api-specs/Konnect/control-planes-config/control-planes-config.yaml +++ b/api-specs/Konnect/control-planes-config/control-planes-config.yaml @@ -516,7 +516,7 @@ paths: get: operationId: list-sni-with-certificate summary: List all SNIs associated with a Certificate - description: List all SNIs associated with a a Certificate + description: List all SNIs associated with a Certificate parameters: - $ref: '#/components/parameters/CertificateId' - $ref: '#/components/parameters/PaginationSize' @@ -567,8 +567,8 @@ paths: '/control-planes/{controlPlaneId}/core-entities/certificates/{CertificateId}/snis/{SNIId}': delete: operationId: delete-sni-with-certificate - summary: Delete a an SNI associated with a a Certificate - description: Delete a an SNI associated with a a Certificate using ID or name. + summary: Delete a an SNI associated with a Certificate + description: Delete a an SNI associated with a Certificate using ID or name. parameters: - $ref: '#/components/parameters/CertificateId' - $ref: '#/components/parameters/SNIId' @@ -889,11 +889,41 @@ paths: $ref: '#/components/responses/HTTP401Error' tags: - Consumers + '/control-planes/{controlPlaneId}/core-entities/consumers/{ConsumerId}/consumer_groups': + get: + operationId: list-consumer-groups-for-consumer + summary: List all Consumer Groups a Consumer belongs to + description: List all Consumer Groups a Consumer belongs to + parameters: + - $ref: '#/components/parameters/ConsumerId' + - $ref: '#/components/parameters/PaginationSize' + - $ref: '#/components/parameters/PaginationOffset' + - $ref: '#/components/parameters/PaginationTagsFilter' + responses: + '200': + description: A successful response listing consumer groups + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ConsumerGroup' + next: + $ref: '#/components/schemas/PaginationNextResponse' + offset: + $ref: '#/components/schemas/PaginationOffsetResponse' + tags: + - Consumer Groups + parameters: + - $ref: '#/components/parameters/controlPlaneId' '/control-planes/{controlPlaneId}/core-entities/consumers/{ConsumerIdForNestedEntities}/acls': get: operationId: list-acl-with-consumer summary: List all ACLs associated with a Consumer - description: List all ACLs associated with a a Consumer + description: List all ACLs associated with a Consumer parameters: - $ref: '#/components/parameters/ConsumerIdForNestedEntities' - $ref: '#/components/parameters/PaginationSize' @@ -944,8 +974,8 @@ paths: '/control-planes/{controlPlaneId}/core-entities/consumers/{ConsumerIdForNestedEntities}/acls/{ACLId}': delete: operationId: delete-acl-with-consumer - summary: Delete a an ACL associated with a a Consumer - description: Delete a an ACL associated with a a Consumer using ID. + summary: Delete a an ACL associated with a Consumer + description: Delete a an ACL associated with a Consumer using ID. parameters: - $ref: '#/components/parameters/ConsumerIdForNestedEntities' - $ref: '#/components/parameters/ACLId' @@ -1001,7 +1031,7 @@ paths: get: operationId: list-basic-auth-with-consumer summary: List all Basic-auth credentials associated with a Consumer - description: List all Basic-auth credentials associated with a a Consumer + description: List all Basic-auth credentials associated with a Consumer parameters: - $ref: '#/components/parameters/ConsumerIdForNestedEntities' - $ref: '#/components/parameters/PaginationSize' @@ -1052,8 +1082,8 @@ paths: '/control-planes/{controlPlaneId}/core-entities/consumers/{ConsumerIdForNestedEntities}/basic-auth/{BasicAuthId}': delete: operationId: delete-basic-auth-with-consumer - summary: Delete a a Basic-auth credential associated with a a Consumer - description: Delete a a Basic-auth credential associated with a a Consumer using ID. + summary: Delete a a Basic-auth credential associated with a Consumer + description: Delete a a Basic-auth credential associated with a Consumer using ID. parameters: - $ref: '#/components/parameters/ConsumerIdForNestedEntities' - $ref: '#/components/parameters/BasicAuthId' @@ -1109,7 +1139,7 @@ paths: get: operationId: list-hmac-auth-with-consumer summary: List all HMAC-auth credentials associated with a Consumer - description: List all HMAC-auth credentials associated with a a Consumer + description: List all HMAC-auth credentials associated with a Consumer parameters: - $ref: '#/components/parameters/ConsumerIdForNestedEntities' - $ref: '#/components/parameters/PaginationSize' @@ -1160,8 +1190,8 @@ paths: '/control-planes/{controlPlaneId}/core-entities/consumers/{ConsumerIdForNestedEntities}/hmac-auth/{HMACAuthId}': delete: operationId: delete-hmac-auth-with-consumer - summary: Delete a a HMAC-auth credential associated with a a Consumer - description: Delete a a HMAC-auth credential associated with a a Consumer using ID. + summary: Delete a a HMAC-auth credential associated with a Consumer + description: Delete a a HMAC-auth credential associated with a Consumer using ID. parameters: - $ref: '#/components/parameters/ConsumerIdForNestedEntities' - $ref: '#/components/parameters/HMACAuthId' @@ -1217,7 +1247,7 @@ paths: get: operationId: list-jwt-with-consumer summary: List all JWTs associated with a Consumer - description: List all JWTs associated with a a Consumer + description: List all JWTs associated with a Consumer parameters: - $ref: '#/components/parameters/ConsumerIdForNestedEntities' - $ref: '#/components/parameters/PaginationSize' @@ -1268,8 +1298,8 @@ paths: '/control-planes/{controlPlaneId}/core-entities/consumers/{ConsumerIdForNestedEntities}/jwt/{JWTId}': delete: operationId: delete-jwt-with-consumer - summary: Delete a a JWT associated with a a Consumer - description: Delete a a JWT associated with a a Consumer using ID. + summary: Delete a a JWT associated with a Consumer + description: Delete a a JWT associated with a Consumer using ID. parameters: - $ref: '#/components/parameters/ConsumerIdForNestedEntities' - $ref: '#/components/parameters/JWTId' @@ -1325,7 +1355,7 @@ paths: get: operationId: list-key-auth-with-consumer summary: List all API-keys associated with a Consumer - description: List all API-keys associated with a a Consumer + description: List all API-keys associated with a Consumer parameters: - $ref: '#/components/parameters/ConsumerIdForNestedEntities' - $ref: '#/components/parameters/PaginationSize' @@ -1376,8 +1406,8 @@ paths: '/control-planes/{controlPlaneId}/core-entities/consumers/{ConsumerIdForNestedEntities}/key-auth/{KeyAuthId}': delete: operationId: delete-key-auth-with-consumer - summary: Delete a an API-key associated with a a Consumer - description: Delete a an API-key associated with a a Consumer using ID. + summary: Delete a an API-key associated with a Consumer + description: Delete a an API-key associated with a Consumer using ID. parameters: - $ref: '#/components/parameters/ConsumerIdForNestedEntities' - $ref: '#/components/parameters/KeyAuthId' @@ -1962,7 +1992,7 @@ paths: get: operationId: list-plugin-with-route summary: List all Plugins associated with a Route - description: List all Plugins associated with a a Route + description: List all Plugins associated with a Route parameters: - $ref: '#/components/parameters/RouteId' - $ref: '#/components/parameters/PaginationSize' @@ -2013,8 +2043,8 @@ paths: '/control-planes/{controlPlaneId}/core-entities/routes/{RouteId}/plugins/{PluginId}': delete: operationId: delete-plugin-with-route - summary: Delete a a Plugin associated with a a Route - description: Delete a a Plugin associated with a a Route using ID. + summary: Delete a a Plugin associated with a Route + description: Delete a a Plugin associated with a Route using ID. parameters: - $ref: '#/components/parameters/RouteId' - $ref: '#/components/parameters/PluginId' @@ -2207,7 +2237,7 @@ paths: get: operationId: list-plugin-with-service summary: List all Plugins associated with a Service - description: List all Plugins associated with a a Service + description: List all Plugins associated with a Service parameters: - $ref: '#/components/parameters/ServiceId' - $ref: '#/components/parameters/PaginationSize' @@ -2258,8 +2288,8 @@ paths: '/control-planes/{controlPlaneId}/core-entities/services/{ServiceId}/plugins/{PluginId}': delete: operationId: delete-plugin-with-service - summary: Delete a a Plugin associated with a a Service - description: Delete a a Plugin associated with a a Service using ID. + summary: Delete a a Plugin associated with a Service + description: Delete a a Plugin associated with a Service using ID. parameters: - $ref: '#/components/parameters/ServiceId' - $ref: '#/components/parameters/PluginId' @@ -2315,7 +2345,7 @@ paths: get: operationId: list-route-with-service summary: List all Routes associated with a Service - description: List all Routes associated with a a Service + description: List all Routes associated with a Service parameters: - $ref: '#/components/parameters/ServiceId' - $ref: '#/components/parameters/PaginationSize' @@ -2366,8 +2396,8 @@ paths: '/control-planes/{controlPlaneId}/core-entities/services/{ServiceId}/routes/{RouteId}': delete: operationId: delete-route-with-service - summary: Delete a a Route associated with a a Service - description: Delete a a Route associated with a a Service using ID or name. + summary: Delete a a Route associated with a Service + description: Delete a a Route associated with a Service using ID or name. parameters: - $ref: '#/components/parameters/ServiceId' - $ref: '#/components/parameters/RouteId' @@ -2641,7 +2671,7 @@ paths: get: operationId: list-target-with-upstream summary: List all Targets associated with an Upstream - description: List all Targets associated with a an Upstream + description: List all Targets associated with an Upstream parameters: - $ref: '#/components/parameters/UpstreamIdForTarget' - $ref: '#/components/parameters/PaginationSize' @@ -2692,8 +2722,8 @@ paths: '/control-planes/{controlPlaneId}/core-entities/upstreams/{UpstreamIdForTarget}/targets/{TargetId}': delete: operationId: delete-target-with-upstream - summary: Delete a a Target associated with a an Upstream - description: Delete a a Target associated with a an Upstream using ID or target. + summary: Delete a a Target associated with an Upstream + description: Delete a a Target associated with an Upstream using ID or target. parameters: - $ref: '#/components/parameters/UpstreamIdForTarget' - $ref: '#/components/parameters/TargetId' @@ -3076,7 +3106,7 @@ components: type: string format: uuid example: 9524ec7d-36d9-465d-a8c5-83a3c9390458 - description: The UUID of your control plane. This variable is available in the Konnect manager + description: The UUID of your control plane. This variable is available in the Konnect manager. pagination-size: description: Number of resources to be returned. in: query @@ -3135,11 +3165,11 @@ components: type: string id: type: string - readOnly: true tags: type: array items: type: string + additionalProperties: false BasicAuth: allOf: - $ref: '#/components/schemas/BasicAuthWithoutParents' @@ -3161,7 +3191,6 @@ components: readOnly: true id: type: string - readOnly: true password: type: string tags: @@ -3170,6 +3199,7 @@ components: type: string username: type: string + additionalProperties: false CACertificate: type: object properties: @@ -3185,7 +3215,6 @@ components: readOnly: true id: type: string - readOnly: true tags: description: An optional set of strings associated with the Certificate for grouping and filtering. type: array @@ -3195,6 +3224,7 @@ components: description: Unix epoch when the resource was last updated. type: integer readOnly: true + additionalProperties: false Certificate: type: object properties: @@ -3210,7 +3240,6 @@ components: readOnly: true id: type: string - readOnly: true key: description: 'PEM-encoded private key of the SSL key pair. This field is _referenceable_, which means it can be securely stored as a [secret](/gateway/latest/plan-and-deploy/security/secrets-management/getting-started) in a vault. References must follow a [specific format](/gateway/latest/plan-and-deploy/security/secrets-management/reference-format).' type: string @@ -3226,6 +3255,7 @@ components: description: Unix epoch when the resource was last updated. type: integer readOnly: true + additionalProperties: false Consumer: type: object properties: @@ -3238,7 +3268,6 @@ components: type: string id: type: string - readOnly: true tags: description: An optional set of strings associated with the Consumer for grouping and filtering. type: array @@ -3251,6 +3280,7 @@ components: username: description: The unique username of the Consumer. You must send either this field or `custom_id` with the request. type: string + additionalProperties: false ConsumerGroup: type: object properties: @@ -3260,7 +3290,6 @@ components: readOnly: true id: type: string - readOnly: true name: type: string tags: @@ -3271,6 +3300,7 @@ components: description: Unix epoch when the resource was last updated. type: integer readOnly: true + additionalProperties: false ConsumerGroupInsideWrapper: type: object properties: @@ -3307,7 +3337,6 @@ components: readOnly: true id: type: string - readOnly: true secret: type: string tags: @@ -3316,6 +3345,7 @@ components: type: string username: type: string + additionalProperties: false JWT: allOf: - $ref: '#/components/schemas/JWTWithoutParents' @@ -3354,7 +3384,6 @@ components: readOnly: true id: type: string - readOnly: true key: type: string rsa_public_key: @@ -3365,6 +3394,7 @@ components: type: array items: type: string + additionalProperties: false Key: type: object properties: @@ -3374,7 +3404,6 @@ components: readOnly: true id: type: string - readOnly: true jwk: description: A JSON Web Key represented as a string. type: string @@ -3409,6 +3438,7 @@ components: description: Unix epoch when the resource was last updated. type: integer readOnly: true + additionalProperties: false KeyAuth: allOf: - $ref: '#/components/schemas/KeyAuthWithoutParents' @@ -3430,13 +3460,13 @@ components: readOnly: true id: type: string - readOnly: true key: type: string tags: type: array items: type: string + additionalProperties: false KeySet: type: object properties: @@ -3446,7 +3476,6 @@ components: readOnly: true id: type: string - readOnly: true name: type: string tags: @@ -3457,6 +3486,7 @@ components: description: Unix epoch when the resource was last updated. type: integer readOnly: true + additionalProperties: false PaginationNextResponse: description: URI to the next page (may be null) type: string @@ -3516,7 +3546,6 @@ components: default: true id: type: string - readOnly: true instance_name: type: string name: @@ -3524,7 +3553,21 @@ components: type: string ordering: type: object - additionalProperties: true + properties: + after: + type: object + properties: + access: + type: array + items: + type: string + before: + type: object + properties: + access: + type: array + items: + type: string protocols: description: 'A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support `"tcp"` and `"tls"`.' type: array @@ -3555,6 +3598,7 @@ components: description: Unix epoch when the resource was last updated. type: integer readOnly: true + additionalProperties: false Route: allOf: - $ref: '#/components/schemas/RouteWithoutParents' @@ -3606,7 +3650,6 @@ components: - 308 id: type: string - readOnly: true methods: description: A list of HTTP methods that match this Route. type: array @@ -3690,6 +3733,7 @@ components: description: Unix epoch when the resource was last updated. type: integer readOnly: true + additionalProperties: false SNI: allOf: - $ref: '#/components/schemas/SNIWithoutParents' @@ -3712,7 +3756,6 @@ components: readOnly: true id: type: string - readOnly: true name: description: The SNI name to associate with the given certificate. type: string @@ -3725,6 +3768,7 @@ components: description: Unix epoch when the resource was last updated. type: integer readOnly: true + additionalProperties: false Service: type: object properties: @@ -3758,7 +3802,6 @@ components: type: string id: type: string - readOnly: true name: description: The Service name. type: string @@ -3815,6 +3858,7 @@ components: description: The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server. type: integer default: 60000 + additionalProperties: false Target: allOf: - $ref: '#/components/schemas/TargetWithoutParents' @@ -3836,7 +3880,6 @@ components: readOnly: true id: type: string - readOnly: true tags: description: An optional set of strings associated with the Target for grouping and filtering. type: array @@ -3853,6 +3896,7 @@ components: description: 'The weight this target gets within the upstream loadbalancer (`0`-`65535`). If the hostname resolves to an SRV record, the `weight` value will be overridden by the value from the DNS record.' type: integer default: 100 + additionalProperties: false Upstream: type: object properties: @@ -4074,7 +4118,6 @@ components: type: string id: type: string - readOnly: true name: description: 'This is a hostname, which must be equal to the `host` of a Service.' type: string @@ -4095,12 +4138,14 @@ components: description: 'If set, the balancer will use SRV hostname(if DNS Answer has SRV record) as the proxy upstream `Host`.' type: boolean default: false + additionalProperties: false Vault: type: object properties: config: description: The configuration properties for the Vault which can be found on the vaults' documentation page. type: object + additionalProperties: true created_at: description: Unix epoch when the resource was created. type: integer @@ -4110,7 +4155,6 @@ components: type: string id: type: string - readOnly: true name: description: 'The name of the Vault that''s going to be added. Currently, the Vault implementation must be installed in every Kong instance.' type: string @@ -4126,6 +4170,7 @@ components: description: Unix epoch when the resource was last updated. type: integer readOnly: true + additionalProperties: false BaseError: description: standard error type: object @@ -4270,7 +4315,7 @@ components: choices: type: array items: {} - minimum: 1 + minItems: 1 nullable: false readOnly: true uniqueItems: true diff --git a/api-specs/Konnect/v0/yaml/mesh-control-planes.yaml b/api-specs/Konnect/v0/yaml/mesh-control-planes.yaml index addd2ded5889..dbafacd43f06 100644 --- a/api-specs/Konnect/v0/yaml/mesh-control-planes.yaml +++ b/api-specs/Konnect/v0/yaml/mesh-control-planes.yaml @@ -427,7 +427,7 @@ components: choices: type: array items: {} - minimum: 1 + minItems: 1 nullable: false readOnly: true uniqueItems: true diff --git a/api-specs/Konnect/v1/yaml/ksearch.yaml b/api-specs/Konnect/v1/yaml/ksearch.yaml index 97539458da58..55a268ffc2ff 100644 --- a/api-specs/Konnect/v1/yaml/ksearch.yaml +++ b/api-specs/Konnect/v1/yaml/ksearch.yaml @@ -354,7 +354,7 @@ components: choices: type: array items: {} - minimum: 1 + minItems: 1 nullable: false readOnly: true uniqueItems: true diff --git a/api-specs/Konnect/v2/yaml/api-products.yaml b/api-specs/Konnect/v2/yaml/api-products.yaml index 9477bfbc286e..d7d954edc6b1 100644 --- a/api-specs/Konnect/v2/yaml/api-products.yaml +++ b/api-specs/Konnect/v2/yaml/api-products.yaml @@ -843,6 +843,10 @@ components: description: API product document title type: string example: API Product Document + created_at: + $ref: '#/components/schemas/CreatedAt' + updated_at: + $ref: '#/components/schemas/UpdatedAt' additionalProperties: false required: - id @@ -850,6 +854,8 @@ components: - slug - title - status + - created_at + - updated_at title: API Product Document Summary APIProductDocument: description: an api product document @@ -1628,7 +1634,7 @@ components: choices: type: array items: {} - minimum: 1 + minItems: 1 nullable: false readOnly: true uniqueItems: true @@ -1759,6 +1765,8 @@ components: description: | Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. + Labels are intended to store **INTERNAL** metadata. + Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". type: object example: @@ -1773,7 +1781,6 @@ components: nullable: true writeOnly: true PublishStatus: - description: document publish status type: string enum: - published @@ -1817,6 +1824,10 @@ components: metadata: author: John Doe children: [] + created_at: + $ref: '#/components/schemas/CreatedAt' + updated_at: + $ref: '#/components/schemas/UpdatedAt' required: - id - title @@ -1824,6 +1835,8 @@ components: - metadata - children - status + - created_at + - updated_at title: DocumentTree ChildNode: type: object @@ -2308,6 +2321,8 @@ components: slug: api-product-document status: published title: API Product Document + created_at: '2022-11-04T20:10:06.927Z' + updated_at: '2022-11-04T20:10:06.927Z' metadata: {} children: - children: [] @@ -2317,6 +2332,8 @@ components: slug: api-product-document-child status: published title: API Product Document Child + created_at: '2022-11-04T20:10:06.927Z' + updated_at: '2022-11-04T20:10:06.927Z' meta: page: number: 1 @@ -2330,6 +2347,8 @@ components: slug: api-product-document status: published title: API Product Document + created_at: '2022-11-04T20:10:06.927Z' + updated_at: '2022-11-04T20:10:06.927Z' meta: page: number: 1 @@ -2451,8 +2470,9 @@ components: invalid_parameters: - field: sort rule: enum - choices: [] - reason: '"sort" field must contain any of: []' + choices: + - name + reason: '"sort" field must contain any of: [name]' InvalidSortQueryNameBadRequestExample: value: status: 400 diff --git a/api-specs/Konnect/v2/yaml/application-auth-strategies.yaml b/api-specs/Konnect/v2/yaml/application-auth-strategies.yaml index 8ad96aa20b6e..50f63d3c7b08 100644 --- a/api-specs/Konnect/v2/yaml/application-auth-strategies.yaml +++ b/api-specs/Konnect/v2/yaml/application-auth-strategies.yaml @@ -1611,7 +1611,7 @@ components: choices: type: array items: {} - minimum: 1 + minItems: 1 nullable: false readOnly: true uniqueItems: true @@ -1727,6 +1727,8 @@ components: description: | Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. + Labels are intended to store **INTERNAL** metadata. + Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". type: object example: diff --git a/api-specs/Konnect/v2/yaml/audit-logs.yaml b/api-specs/Konnect/v2/yaml/audit-logs.yaml index 12bfa9ca0095..5c52305c2ed0 100644 --- a/api-specs/Konnect/v2/yaml/audit-logs.yaml +++ b/api-specs/Konnect/v2/yaml/audit-logs.yaml @@ -304,7 +304,7 @@ components: choices: type: array items: {} - minimum: 1 + minItems: 1 nullable: false readOnly: true uniqueItems: true diff --git a/api-specs/Konnect/v2/yaml/control-planes.yaml b/api-specs/Konnect/v2/yaml/control-planes.yaml index 373f50d95686..da9701350ae3 100644 --- a/api-specs/Konnect/v2/yaml/control-planes.yaml +++ b/api-specs/Konnect/v2/yaml/control-planes.yaml @@ -188,6 +188,27 @@ paths: $ref: '#/components/responses/ServiceUnavailable' tags: - Control Plane Groups + put: + operationId: put-control-planes-id-group-memberships + summary: Upsert Control Plane Group Members + description: Adds one or more control planes as a member of a control plane group. + requestBody: + $ref: '#/components/requestBodies/GroupMemebershipUpsert' + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '503': + $ref: '#/components/responses/ServiceUnavailable' + tags: + - Control Plane Groups '/control-planes/{id}/group-memberships/add': parameters: - name: id @@ -758,6 +779,7 @@ components: type: array items: $ref: '#/components/schemas/ProxyURL' + format: set example: - host: example.com port: 443 @@ -942,7 +964,7 @@ components: choices: type: array items: {} - minimum: 1 + minItems: 1 nullable: false readOnly: true uniqueItems: true @@ -1336,6 +1358,19 @@ components: - id: 778a0474-687d-41af-8e51-a0488d790586 - id: fa85f8e8-2e5a-496e-b6d0-4e534eaab459 description: Request body for removing a list of child control planes from a control plane group membership. + GroupMemebershipUpsert: + content: + application/json: + schema: + $ref: '#/components/schemas/GroupMembership' + examples: + Example 1: + value: + members: + - id: 1beb9ad3-d21b-4090-b6e3-574784d1166d + - id: 778a0474-687d-41af-8e51-a0488d790586 + - id: fa85f8e8-2e5a-496e-b6d0-4e534eaab459 + description: Request body for upserting a list of child control planes to a control plane group membership. responses: RetrieveControlPlaneResponse: description: A response to retrieving a single control plane. diff --git a/api-specs/Konnect/v2/yaml/portal-management.yaml b/api-specs/Konnect/v2/yaml/portal-management.yaml index 8f2180078d08..00f3ca98f53c 100644 --- a/api-specs/Konnect/v2/yaml/portal-management.yaml +++ b/api-specs/Konnect/v2/yaml/portal-management.yaml @@ -1588,11 +1588,11 @@ components: type: object properties: basic_auth_enabled: - description: The organization has basic auth enabled. + description: The portal has basic auth enabled or disabled. type: boolean example: true oidc_auth_enabled: - description: The organization has OIDC disabled. + description: The portal has OIDC enabled or disabled. type: boolean example: false oidc_team_mapping_enabled: @@ -2691,6 +2691,7 @@ components: portal: id: 95606071-49c7-4c2e-ae49-8a86d72a8110 dcr_provider: null + granted_scopes: null developer: id: 9cd9feff-b4da-4a9f-ba49-cbe83c75ff22 name: Jane Dev @@ -2708,6 +2709,8 @@ components: id: 95606071-49c7-4c2e-ae49-8a86d72a8110 dcr_provider: id: 7ea06071-49c7-4c2e-ae49-8a86d72a8110 + granted_scopes: + - openid developer: id: 9cd9feff-b4da-4a9f-ba49-cbe83c75ff22 name: John Dev @@ -2998,6 +3001,12 @@ components: - email auth_strategy: $ref: '#/components/schemas/AuthStrategy' + granted_scopes: + description: List of granted scopes for the application. Null if application type does not support returning granted scopes. + type: array + items: + type: string + nullable: true example: id: b15e2460-ba40-431d-9df0-4957fcffacda labels: @@ -3009,6 +3018,7 @@ components: portal: id: 95606071-49c7-4c2e-ae49-8a86d72a8110 dcr_provider: null + granted_scopes: null developer: id: 9cd9feff-b4da-4a9f-ba49-cbe83c75ff22 name: Jane Dev @@ -3028,6 +3038,7 @@ components: - portal - developer - labels + - granted_scopes title: Application ApplicationRegistration: description: A application's registration for a specific version of a product. @@ -3094,10 +3105,11 @@ components: - id - name granted_scopes: - description: List of granted scopes for the registration. Null if application type does not support returning granted scopes. + description: 'Cached list of granted scopes for the registration. Identical for all registrations of an applications, use `/portals/{portalId}/applications/{applicationId}` to get up to date granted scopes from the IDP. Null if application type does not support returning granted scopes.' type: array items: type: string + deprecated: true nullable: true example: id: c300cc33-2d33-4754-b086-a98e0fcd36fb @@ -4470,7 +4482,7 @@ components: choices: type: array items: {} - minimum: 1 + minItems: 1 nullable: false readOnly: true uniqueItems: true @@ -4586,6 +4598,8 @@ components: description: | Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. + Labels are intended to store **INTERNAL** metadata. + Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". type: object example: @@ -5382,6 +5396,7 @@ components: portal: id: 95606071-49c7-4c2e-ae49-8a86d72a8110 dcr_provider: null + granted_scopes: null developer: id: 9cd9feff-b4da-4a9f-ba49-cbe83c75ff22 name: Jane Dev @@ -5399,6 +5414,8 @@ components: id: 95606071-49c7-4c2e-ae49-8a86d72a8110 dcr_provider: id: 7ea06071-49c7-4c2e-ae49-8a86d72a8110 + granted_scopes: + - openid developer: id: 9cd9feff-b4da-4a9f-ba49-cbe83c75ff22 name: John Dev @@ -5417,6 +5434,7 @@ components: portal: id: 95606071-49c7-4c2e-ae49-8a86d72a8110 dcr_provider: null + granted_scopes: null developer: id: 9cd9feff-b4da-4a9f-ba49-cbe83c75ff22 name: Jane Dev @@ -5436,6 +5454,8 @@ components: id: 95606071-49c7-4c2e-ae49-8a86d72a8110 dcr_provider: id: 7ea06071-49c7-4c2e-ae49-8a86d72a8110 + granted_scopes: + - openid developer: id: 9cd9feff-b4da-4a9f-ba49-cbe83c75ff22 name: John Dev diff --git a/api-specs/Konnect/v3/yaml/identity.yaml b/api-specs/Konnect/v3/yaml/identity.yaml index 79ed7518f838..e1f869e8c3de 100644 --- a/api-specs/Konnect/v3/yaml/identity.yaml +++ b/api-specs/Konnect/v3/yaml/identity.yaml @@ -1144,6 +1144,33 @@ paths: $ref: '#/components/responses/IdentityNotFound' tags: - System Accounts - Team Membership + /users/me: + get: + operationId: get-users-me + summary: Retrieve My User Account + description: Returns the user account for the user identified in the token of the request. + responses: + '200': + $ref: '#/components/responses/UserSingle' + '401': + $ref: '#/components/responses/IdentityUnauthenticated' + security: + - personalAccessToken: [] + - konnectAccessToken: [] + tags: + - Me + /organizations/me: + get: + operationId: get-organizations-me + summary: Retrieve My Organization + description: Returns the organization of the user identified in the token of the request. + responses: + '200': + $ref: '#/components/responses/MeOrganization' + '401': + $ref: '#/components/responses/IdentityUnauthenticated' + tags: + - Me '/authenticate/{organizationLoginPath}': get: operationId: authenticate-sso @@ -1642,7 +1669,7 @@ components: choices: type: array items: {} - minimum: 1 + minItems: 1 nullable: false readOnly: true uniqueItems: true @@ -1833,6 +1860,8 @@ components: description: | Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. + Labels are intended to store **INTERNAL** metadata. + Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". type: object example: @@ -3637,6 +3666,66 @@ components: expires_at: '2019-08-24T14:15:22Z' last_used_at: '2019-08-24T14:15:22Z' token: npat_12345678901234567890123456789012345678901234567890 + MeOrganization: + description: Me Organization + content: + application/json: + schema: + type: object + properties: + id: + description: UUID of the organization. + type: string + format: uuid + readOnly: true + name: + description: Name of the organization. + type: string + owner_id: + description: Owner ID of the organization. + type: string + login_path: + description: Path to organization-specific login when single sign on (SSO) is enabled. Blank otherwise. + type: string + created_at: + description: Date the organization was created. + type: string + format: date-time + readOnly: true + updated_at: + description: Date the organization was last updated. + type: string + format: date-time + readOnly: true + state: + description: State of the organization + type: string + enum: + - active + - inactive + retention_period_days: + description: The number of days an organization spends inactive before being deleted. + type: integer + example: + id: d99c041a-c7cf-46a2-bf3a-44bb5f75400e + name: string + owner_id: 1c9c3848-5897-4f2c-beed-df6f3e3adb37 + created_at: '2023-01-23T17:22:52.150Z' + updated_at: '2023-01-23T17:22:52.150Z' + state: active + retention_period_days: 90 + title: Me Organization Response + examples: + Example: + value: + created_at: '2023-01-18T11:35:45.130Z' + id: 023bfa42-3513-4cbf-b059-a9ddb4ea995d + name: Acme Co. + owner_id: e02c829c-0e2d-44b5-9057-07714ea613a3 + login_path: acme + updated_at: '2023-01-23T17:22:52.150Z' + state: active + retention_period_days: 90 IdPConfiguration: description: A get action response of the IdP configuration. content: @@ -3679,6 +3768,7 @@ tags: - name: System Accounts - Access Tokens - name: System Accounts - Roles - name: System Accounts - Team Membership + - name: Me - name: Authentication - name: Impersonation Settings security: diff --git a/api-specs/portal.yaml b/api-specs/portal.yaml index f576c5dcba2c..3569cae5d8a0 100644 --- a/api-specs/portal.yaml +++ b/api-specs/portal.yaml @@ -272,6 +272,8 @@ paths: - $ref: '#/components/parameters/FilterByProductNameEqualityShort' - $ref: '#/components/parameters/FilterByProductVersionNameEquality' - $ref: '#/components/parameters/FilterByProductVersionNameEqualityShort' + - $ref: '#/components/parameters/FilterByProductVersionNameContains' + - $ref: '#/components/parameters/FilterByProductNameContains' responses: '200': $ref: '#/components/responses/ListRegistrations' @@ -1062,6 +1064,14 @@ components: schema: type: string example: good service + FilterByProductNameContains: + name: 'filter[product_name][contains]' + description: Filter by contains comparison of the product_name property with a supplied substring + in: query + required: false + schema: + type: string + example: good service FilterByProductNameEquality: name: 'filter[product_name][eq]' description: Filter by direct equality comparison of the product_name property with a supplied value. @@ -1078,6 +1088,14 @@ components: schema: type: string example: good service + FilterByProductVersionNameContains: + name: 'filter[product_version_name][contains]' + description: Filter by contains comparison of the product_version_name property with a supplied substring + in: query + required: false + schema: + type: string + example: good service FilterByProductVersionNameEquality: name: 'filter[product_version_name][eq]' description: Filter by direct equality comparison of the product_version_name property with a supplied value. @@ -2119,7 +2137,7 @@ components: choices: type: array items: {} - minimum: 1 + minItems: 1 nullable: false readOnly: true uniqueItems: true @@ -2484,8 +2502,12 @@ components: name: description: Name of the developer portal. type: string + canonical_domain: + description: The canonical domain of the developer portal. + type: string additionalProperties: false required: + - canonical_domain - portal_id - org_id - is_public @@ -3411,6 +3433,7 @@ components: type: array items: type: string + deprecated: true additionalProperties: false required: - id @@ -4276,3 +4299,9 @@ tags: all of the described endpoints will return a 404 error - name: search description: The API for Konnect Portal Search. +x-errors: + granted-scopes-unavailable: + description: | + The IDP used does not support granted scopes. + resolution: | + Switch to an IDP that allows you to grant specific scopes.