Skip to content

Commit

Permalink
feat(sdk): automated oas update
Browse files Browse the repository at this point in the history
  • Loading branch information
kong-apiops committed Oct 30, 2024
1 parent de0a7b0 commit b6ae1b5
Show file tree
Hide file tree
Showing 4 changed files with 182 additions and 194 deletions.
17 changes: 17 additions & 0 deletions api-specs/Konnect/v2/yaml/api-products.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,8 @@ components:
$ref: '#/components/schemas/StringFieldFilter'
publish_status:
$ref: '#/components/schemas/StringFieldFilter'
gateway_service_id:
$ref: '#/components/schemas/UuidFieldFilter'
title: APIProductVersionFilterParameters
SortQuery:
description: |
Expand Down Expand Up @@ -2142,6 +2144,21 @@ components:
required:
- checked
- type
UuidFieldFilter:
description: Filters on the given UUID field value by exact match.
oneOf:
- $ref: '#/components/schemas/StringFieldEqualsFilter'
- $ref: '#/components/schemas/StringFieldOEQFilter'
- $ref: '#/components/schemas/StringFieldNEQFilter'
title: UuidFieldFilter
x-examples:
example-1: 3bbfd3a-e9ab-48a9-9881-ed589e4615d1
example-2:
eq: 3bbfd3a-e9ab-48a9-9881-ed589e4615d1
example-3:
oeq: 3bbfd3a-e9ab-48a9-9881-ed589e4615d1
example-4:
neq: 3bbfd3a-e9ab-48a9-9881-ed589e4615d1
ConflictError:
allOf:
- $ref: '#/components/schemas/BaseError'
Expand Down
273 changes: 125 additions & 148 deletions api-specs/Konnect/v2/yaml/control-planes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,7 @@ paths:
parameters:
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PageNumber'
- $ref: '#/components/parameters/FilterByNameEquality'
- $ref: '#/components/parameters/FilterByNameEqualityShort'
- $ref: '#/components/parameters/FilterByNameContains'
- $ref: '#/components/parameters/FilterByNameNotEquals'
- $ref: '#/components/parameters/FilterByIdEquality'
- $ref: '#/components/parameters/FilterByIdEqualityShort'
- $ref: '#/components/parameters/FilterByIdsEquality'
- $ref: '#/components/parameters/FilterByClusterTypeEquality'
- $ref: '#/components/parameters/FilterByClusterTypeEqualityShort'
- $ref: '#/components/parameters/FilterByClusterTypeNotEquals'
- $ref: '#/components/parameters/ControlPlaneFilter'
- $ref: '#/components/parameters/FilterByLabels'
- $ref: '#/components/parameters/ControlPlaneSort'
responses:
Expand Down Expand Up @@ -323,6 +314,14 @@ paths:
- Control Plane Groups
components:
parameters:
ControlPlaneFilter:
name: filter
description: Filters a collection of control-planes.
required: false
in: query
schema:
$ref: '#/components/schemas/ControlPlaneFilterParameters'
style: deepObject
ControlPlaneSort:
name: sort
description: |
Expand All @@ -332,54 +331,6 @@ components:
in: query
schema:
$ref: '#/components/schemas/SortQuery'
FilterByClusterTypeEquality:
name: 'filter[cluster_type][eq]'
description: Filter by direct equality comparison of the cluster_type property with a supplied value.
in: query
required: false
schema:
type: string
example: CLUSTER_TYPE_CONTROL_PLANE
FilterByClusterTypeEqualityShort:
name: 'filter[cluster_type]'
description: Filter by direct equality comparison (short-hand) of the cluster_type property with a supplied value.
in: query
required: false
schema:
type: string
example: CLUSTER_TYPE_CONTROL_PLANE
FilterByClusterTypeNotEquals:
name: 'filter[cluster_type][neq]'
description: Filter by non-equality comparison of the cluster_type property with a supplied value.
in: query
required: false
schema:
type: string
example: test
FilterByIdEquality:
name: 'filter[id][eq]'
description: Filter by direct equality comparison of the id property with a supplied value.
in: query
required: false
schema:
type: string
example: 7f9fd312-a987-4628-b4c5-bb4f4fddd5f7
FilterByIdEqualityShort:
name: 'filter[id]'
description: Filter by direct equality comparison (short-hand) of the id property with a supplied value.
in: query
required: false
schema:
type: string
example: 7f9fd312-a987-4628-b4c5-bb4f4fddd5f7
FilterByIdsEquality:
name: 'filter[id][oeq]'
description: Filter by direct equality comparison of id property with multiple supplied values.
in: query
required: false
schema:
type: string
example: 'some-value,some-other-value'
FilterByLabels:
name: labels
description: Filter control planes in the response by associated labels.
Expand All @@ -388,38 +339,6 @@ components:
schema:
type: string
example: 'key:value,existCheck'
FilterByNameContains:
name: 'filter[name][contains]'
description: Filter by contains comparison of the name property with a supplied substring.
in: query
required: false
schema:
type: string
example: test
FilterByNameEquality:
name: 'filter[name][eq]'
description: Filter by direct equality comparison of the name property with a supplied value.
in: query
required: false
schema:
type: string
example: test
FilterByNameEqualityShort:
name: 'filter[name]'
description: Filter by direct equality comparison (short-hand) of the name property with a supplied value.
in: query
required: false
schema:
type: string
example: test
FilterByNameNotEquals:
name: 'filter[name][neq]'
description: Filter by non-equality comparison of the name property with a supplied value.
in: query
required: false
schema:
type: string
example: test
PageAfter:
name: 'page[after]'
description: 'Request the next page of data, starting with the item after this parameter.'
Expand Down Expand Up @@ -476,7 +395,6 @@ components:
example: CLUSTER_TYPE_CONTROL_PLANE
enum:
- CLUSTER_TYPE_CONTROL_PLANE
- CLUSTER_TYPE_HYBRID
- CLUSTER_TYPE_K8S_INGRESS_CONTROLLER
- CLUSTER_TYPE_CONTROL_PLANE_GROUP
- CLUSTER_TYPE_SERVERLESS
Expand Down Expand Up @@ -525,60 +443,6 @@ components:
additionalProperties: false
title: UpdateControlPlaneRequest
ControlPlane:
allOf:
- $ref: '#/components/schemas/ControlPlaneSummary'
- type: object
properties:
labels:
$ref: '#/components/schemas/Labels'
config:
description: CP configuration object for related access endpoints.
type: object
properties:
control_plane_endpoint:
description: Control Plane Endpoint.
type: string
format: url
example: 'https://acfe5f253f.cp0.konghq.com'
readOnly: true
telemetry_endpoint:
description: Telemetry Endpoint.
type: string
format: url
example: 'https://acfe5f253f.tp0.konghq.com'
readOnly: true
created_at:
description: An ISO-8604 timestamp representation of control plane creation date.
type: string
format: date-time
example: '2022-11-04T20:10:06.927Z'
readOnly: true
updated_at:
description: An ISO-8604 timestamp representation of control plane update date.
type: string
format: date-time
example: '2022-11-04T20:10:06.927Z'
readOnly: true
x-examples:
Example 1:
id: 7f9fd312-a987-4628-b4c5-bb4f4fddd5f7
name: Test Control Plane
description: A test control plane for exploration.
labels:
env: test
config:
control_plane_endpoint: 'https://acfe5f253f.cp0.konghq.com'
telemetry_endpoint: 'https://acfe5f253f.tp0.konghq.com'
cluster_type: CLUSTER_TYPE_CONTROL_PLANE
auth_type: pinned_client_certs
cloud_gateway: false
proxy_urls:
- host: example.com
port: 443
protocol: https
created_at: '2022-11-04T20:10:06.927Z'
updated_at: '2022-11-04T20:10:06.927Z'
ControlPlaneSummary:
description: The control plane object contains information about a Kong control plane.
type: object
properties:
Expand Down Expand Up @@ -621,7 +485,6 @@ components:
example: CLUSTER_TYPE_CONTROL_PLANE
enum:
- CLUSTER_TYPE_CONTROL_PLANE
- CLUSTER_TYPE_HYBRID
- CLUSTER_TYPE_K8S_INGRESS_CONTROLLER
- CLUSTER_TYPE_CONTROL_PLANE_GROUP
- CLUSTER_TYPE_SERVERLESS
Expand All @@ -647,13 +510,43 @@ components:
- auth_type
- cloud_gateway
created_at:
description: An ISO-8604 timestamp representation of control plane creation date.
type: string
format: date-time
example: '2022-11-04T20:10:06.927Z'
readOnly: true
updated_at:
description: An ISO-8604 timestamp representation of control plane update date.
type: string
format: date-time
example: '2022-11-04T20:10:06.927Z'
readOnly: true
additionalProperties: false
title: ControlPlaneSummary
required:
- id
- name
- config
- created_at
- updated_at
x-examples:
Example 1:
id: 7f9fd312-a987-4628-b4c5-bb4f4fddd5f7
name: Test Control Plane
description: A test control plane for exploration.
labels:
env: test
config:
control_plane_endpoint: 'https://acfe5f253f.cp0.konghq.com'
telemetry_endpoint: 'https://acfe5f253f.tp0.konghq.com'
cluster_type: CLUSTER_TYPE_CONTROL_PLANE
auth_type: pinned_client_certs
cloud_gateway: false
proxy_urls:
- host: example.com
port: 443
protocol: https
created_at: '2022-11-04T20:10:06.927Z'
updated_at: '2022-11-04T20:10:06.927Z'
GroupStatus:
description: The Group Status object contains information about the status of a control plane group.
type: object
Expand Down Expand Up @@ -785,6 +678,88 @@ components:
port: 443
protocol: https
title: ProxyURLs
ControlPlaneFilterParameters:
type: object
properties:
id:
oneOf:
- $ref: '#/components/schemas/StringFieldEqualsFilter'
- $ref: '#/components/schemas/StringFieldOEQFilter'
name:
oneOf:
- $ref: '#/components/schemas/StringFieldEqualsFilter'
- $ref: '#/components/schemas/StringFieldContainsFilter'
- $ref: '#/components/schemas/StringFieldNEQFilter'
cluster_type:
oneOf:
- $ref: '#/components/schemas/StringFieldEqualsFilter'
- $ref: '#/components/schemas/StringFieldNEQFilter'
cloud_gateway:
$ref: '#/components/schemas/BooleanFieldFilter'
additionalProperties: false
title: ControlPlaneFilterParameters
StringFieldEqualsFilter:
description: Filters on the given string field value by exact match.
oneOf:
- type: string
- type: object
title: StringFieldEqualsComparison
additionalProperties: false
properties:
eq:
type: string
required:
- eq
title: StringFieldEqualsFilter
x-examples:
example-1: equals-some-value
example-2:
eq: some-value
StringFieldOEQFilter:
description: Returns entities that exact match any of the comma-delimited phrases in the filter string.
type: object
properties:
oeq:
type: string
additionalProperties: false
required:
- oeq
title: StringFieldOEQFilter
x-examples:
example-1:
oeq: 'some-value,some-other-value'
StringFieldContainsFilter:
description: Filters on the given string field value by fuzzy match.
type: object
properties:
contains:
type: string
additionalProperties: false
required:
- contains
title: StringFieldContainsFilter
x-examples:
example-1:
contains: some-value
StringFieldNEQFilter:
description: Filters on the given string field value by exact match inequality.
type: object
properties:
neq:
type: string
additionalProperties: false
required:
- neq
title: StringFieldNEQFilter
x-examples:
example-1:
neq: not-this-value
BooleanFieldFilter:
description: Filter by a boolean value (true/false).
type: boolean
title: BooleanFieldFilter
x-examples:
example-1: true
SortQuery:
description: |
The `asc` suffix is optional as the default sort order is ascending.
Expand Down Expand Up @@ -1236,6 +1211,8 @@ components:
- host: example.com
port: 443
protocol: https
created_at: '2022-11-04T20:10:06.927Z'
updated_at: '2022-11-04T20:10:06.927Z'
GroupConflictStatusExample:
value:
id: 7f9fd312-a987-4628-b4c5-bb4f4fddd5f7
Expand Down Expand Up @@ -1551,7 +1528,7 @@ components:
description: Array of control planes summary who are a child to this control plane group.
type: array
items:
$ref: '#/components/schemas/ControlPlaneSummary'
$ref: '#/components/schemas/ControlPlane'
examples:
List Group Memberships Example:
$ref: '#/components/examples/ListGroupMembershipsExample'
Expand Down
Loading

0 comments on commit b6ae1b5

Please sign in to comment.