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 Nov 5, 2024
1 parent 831c2d7 commit 37a02f5
Show file tree
Hide file tree
Showing 10 changed files with 651 additions and 20 deletions.
326 changes: 324 additions & 2 deletions api-specs/Konnect/control-planes-config/control-planes-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,32 @@ paths:
tags:
- Consumer Groups
'/control-planes/{controlPlaneId}/core-entities/consumer_groups/{ConsumerGroupId}/consumers':
get:
operationId: list-consumers-for-consumer-group
summary: List all Consumers in a Consumer Group
description: List all consumers in a consumer group
parameters:
- $ref: '#/components/parameters/PaginationSize'
- $ref: '#/components/parameters/PaginationOffset'
- $ref: '#/components/parameters/PaginationTagsFilter'
responses:
'200':
description: A successful response listing of consumers
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Consumer'
next:
$ref: '#/components/schemas/PaginationNextResponse'
offset:
$ref: '#/components/schemas/PaginationOffsetResponse'
tags:
- Consumer Groups
parameters:
- $ref: '#/components/parameters/ConsumerGroupIdManageConsumers'
- $ref: '#/components/parameters/controlPlaneId'
Expand Down Expand Up @@ -780,6 +806,114 @@ paths:
schema:
type: string
- $ref: '#/components/parameters/controlPlaneId'
'/control-planes/{controlPlaneId}/core-entities/consumer_groups/{ConsumerGroupId}/plugins':
get:
operationId: list-plugin-with-consumer_group
summary: List all Plugins associated with a Consumer Group
description: List all Plugins associated with a Consumer Group
parameters:
- $ref: '#/components/parameters/ConsumerGroupId'
- $ref: '#/components/parameters/PaginationSize'
- $ref: '#/components/parameters/PaginationOffset'
- $ref: '#/components/parameters/PaginationTagsFilter'
responses:
'200':
description: A successful response listing Plugins
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Plugin'
next:
$ref: '#/components/schemas/PaginationNextResponse'
offset:
$ref: '#/components/schemas/PaginationOffsetResponse'
tags:
- Plugins
parameters:
- $ref: '#/components/parameters/controlPlaneId'
post:
operationId: create-plugin-with-consumer_group
summary: Create a new Plugin associated with a Consumer Group
description: Create a new Plugin associated with a Consumer Group
parameters:
- $ref: '#/components/parameters/ConsumerGroupId'
requestBody:
description: Description of new Plugin for creation
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PluginWithoutParents'
responses:
'201':
description: Successfully created Plugin
content:
application/json:
schema:
$ref: '#/components/schemas/Plugin'
tags:
- Plugins
'/control-planes/{controlPlaneId}/core-entities/consumer_groups/{ConsumerGroupId}/plugins/{PluginId}':
delete:
operationId: delete-plugin-with-consumer_group
summary: Delete a a Plugin associated with a Consumer Group
description: Delete a a Plugin associated with a Consumer Group using ID.
parameters:
- $ref: '#/components/parameters/ConsumerGroupId'
- $ref: '#/components/parameters/PluginId'
responses:
'204':
description: Successfully deleted Plugin or the resource didn't exist
tags:
- Plugins
get:
operationId: get-plugin-with-consumer_group
summary: Fetch a Plugin associated with a Consumer Group
description: Get a Plugin associated with a Consumer Group using ID.
parameters:
- $ref: '#/components/parameters/ConsumerGroupId'
- $ref: '#/components/parameters/PluginId'
responses:
'200':
description: Successfully fetched Plugin
content:
application/json:
schema:
$ref: '#/components/schemas/Plugin'
'404':
description: Resource does not exist
tags:
- Plugins
parameters:
- $ref: '#/components/parameters/controlPlaneId'
put:
operationId: upsert-plugin-with-consumer_group
summary: Upsert a Plugin associated with a Consumer Group
description: Create or Update a Plugin associated with a Consumer Group using ID.
parameters:
- $ref: '#/components/parameters/ConsumerGroupId'
- $ref: '#/components/parameters/PluginId'
requestBody:
description: Description of the Plugin
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PluginWithoutParents'
responses:
'200':
description: Successfully upserted Plugin
content:
application/json:
schema:
$ref: '#/components/schemas/Plugin'
tags:
- Plugins
'/control-planes/{controlPlaneId}/core-entities/consumers':
get:
operationId: list-consumer
Expand Down Expand Up @@ -919,6 +1053,52 @@ paths:
- Consumer Groups
parameters:
- $ref: '#/components/parameters/controlPlaneId'
post:
operationId: add-consumer-to-specific-consumer-group
summary: Add consumer to a specific consumer group
description: Add a consumer to a consumer group
parameters:
- $ref: '#/components/parameters/ConsumerId'
requestBody:
content:
application/json:
schema:
type: object
properties:
group:
type: string
example: fedee695-2ae2-4e45-877a-776d9b2fc793
responses:
'201':
description: Consumer added to a specific group
content:
application/json:
schema:
type: object
properties:
consumer:
$ref: '#/components/schemas/Consumer'
consumer_groups:
type: array
items:
$ref: '#/components/schemas/ConsumerGroup'
tags:
- Consumer Groups
'/control-planes/{controlPlaneId}/core-entities/consumers/{ConsumerId}/consumer_groups/{ConsumerGroupId}':
delete:
operationId: remove-consumer-from-consumer-group
summary: Remove consumer from consumer group
description: Removes a consumer from a consumer group. This operation does not delete the consumer group.
parameters:
- $ref: '#/components/parameters/ConsumerId'
- $ref: '#/components/parameters/ConsumerGroupId'
responses:
'204':
description: Consumer removed from group
tags:
- Consumer Groups
parameters:
- $ref: '#/components/parameters/controlPlaneId'
'/control-planes/{controlPlaneId}/core-entities/consumers/{ConsumerIdForNestedEntities}/acls':
get:
operationId: list-acl-with-consumer
Expand Down Expand Up @@ -1459,6 +1639,114 @@ paths:
$ref: '#/components/schemas/KeyAuth'
tags:
- API-keys
'/control-planes/{controlPlaneId}/core-entities/consumers/{ConsumerIdForNestedEntities}/plugins':
get:
operationId: list-plugin-with-consumer
summary: List all Plugins associated with a Consumer
description: List all Plugins associated with a Consumer
parameters:
- $ref: '#/components/parameters/ConsumerIdForNestedEntities'
- $ref: '#/components/parameters/PaginationSize'
- $ref: '#/components/parameters/PaginationOffset'
- $ref: '#/components/parameters/PaginationTagsFilter'
responses:
'200':
description: A successful response listing Plugins
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Plugin'
next:
$ref: '#/components/schemas/PaginationNextResponse'
offset:
$ref: '#/components/schemas/PaginationOffsetResponse'
tags:
- Plugins
parameters:
- $ref: '#/components/parameters/controlPlaneId'
post:
operationId: create-plugin-with-consumer
summary: Create a new Plugin associated with a Consumer
description: Create a new Plugin associated with a Consumer
parameters:
- $ref: '#/components/parameters/ConsumerIdForNestedEntities'
requestBody:
description: Description of new Plugin for creation
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PluginWithoutParents'
responses:
'201':
description: Successfully created Plugin
content:
application/json:
schema:
$ref: '#/components/schemas/Plugin'
tags:
- Plugins
'/control-planes/{controlPlaneId}/core-entities/consumers/{ConsumerIdForNestedEntities}/plugins/{PluginId}':
delete:
operationId: delete-plugin-with-consumer
summary: Delete a a Plugin associated with a Consumer
description: Delete a a Plugin associated with a Consumer using ID.
parameters:
- $ref: '#/components/parameters/ConsumerIdForNestedEntities'
- $ref: '#/components/parameters/PluginId'
responses:
'204':
description: Successfully deleted Plugin or the resource didn't exist
tags:
- Plugins
get:
operationId: get-plugin-with-consumer
summary: Fetch a Plugin associated with a Consumer
description: Get a Plugin associated with a Consumer using ID.
parameters:
- $ref: '#/components/parameters/ConsumerIdForNestedEntities'
- $ref: '#/components/parameters/PluginId'
responses:
'200':
description: Successfully fetched Plugin
content:
application/json:
schema:
$ref: '#/components/schemas/Plugin'
'404':
description: Resource does not exist
tags:
- Plugins
parameters:
- $ref: '#/components/parameters/controlPlaneId'
put:
operationId: upsert-plugin-with-consumer
summary: Upsert a Plugin associated with a Consumer
description: Create or Update a Plugin associated with a Consumer using ID.
parameters:
- $ref: '#/components/parameters/ConsumerIdForNestedEntities'
- $ref: '#/components/parameters/PluginId'
requestBody:
description: Description of the Plugin
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PluginWithoutParents'
responses:
'200':
description: Successfully upserted Plugin
content:
application/json:
schema:
$ref: '#/components/schemas/Plugin'
tags:
- Plugins
'/control-planes/{controlPlaneId}/core-entities/hmac-auths':
get:
operationId: list-hmac-auth
Expand Down Expand Up @@ -5148,7 +5436,6 @@ components:
type: string
enum:
- required
- max_length
- is_array
- is_base64
- is_boolean
Expand Down Expand Up @@ -5206,6 +5493,8 @@ components:
- min_lowercase
- min_uppercase
- min_symbols
- min_items
- min
nullable: false
readOnly: true
minimum:
Expand All @@ -5216,14 +5505,46 @@ components:
example: body
reason:
type: string
example: is a required field
example: must have at least 8 characters
readOnly: true
additionalProperties: false
required:
- field
- reason
- rule
- minimum
InvalidParameterMaximumLength:
type: object
properties:
field:
type: string
example: name
readOnly: true
rule:
description: invalid parameters rules
type: string
enum:
- max_length
- max_items
- max
nullable: false
readOnly: true
maximum:
type: integer
example: 8
source:
type: string
example: body
reason:
type: string
example: must not have more than 8 characters
readOnly: true
additionalProperties: false
required:
- field
- reason
- rule
- maximum
InvalidParameterChoiceItem:
type: object
properties:
Expand Down Expand Up @@ -5298,6 +5619,7 @@ components:
oneOf:
- $ref: '#/components/schemas/InvalidParameterStandard'
- $ref: '#/components/schemas/InvalidParameterMinimumLength'
- $ref: '#/components/schemas/InvalidParameterMaximumLength'
- $ref: '#/components/schemas/InvalidParameterChoiceItem'
- $ref: '#/components/schemas/InvalidParameterDependentItem'
minItems: 1
Expand Down
Loading

0 comments on commit 37a02f5

Please sign in to comment.