Skip to content

Commit

Permalink
Feat: 3.9 API specs (#8234)
Browse files Browse the repository at this point in the history
* fix typo

* fix typo

* add config endpoint

* add list_consumers parameter

* fix copy paste error

* add endpoint to update admins's belong workspace

* added minlength for tag pagination

* fixes after review

* minlength to nullable

* minlength to nullable

* add yaml example

---------

Co-authored-by: Angel <[email protected]>
  • Loading branch information
lmilan and Guaris authored Dec 10, 2024
1 parent ab26227 commit f2c732b
Show file tree
Hide file tree
Showing 7 changed files with 206 additions and 4 deletions.
2 changes: 2 additions & 0 deletions api-specs/Gateway-EE/3.8/kong-ee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ components:
name: tags
schema:
type: string
nullable: false
certificate_name_or_id:
name: certificate_name_or_id
in: path
Expand Down Expand Up @@ -225,6 +226,7 @@ components:
name: tags
schema:
type: string
nullable: false
filter_chain_id:
name: filter_chain_id
in: path
Expand Down
134 changes: 134 additions & 0 deletions api-specs/Gateway-EE/3.9/kong-ee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ components:
name: tags
schema:
type: string
nullable: false
certificate_name_or_id:
name: certificate_name_or_id
in: path
Expand Down Expand Up @@ -225,6 +226,7 @@ components:
name: tags
schema:
type: string
nullable: false
filter_chain_id:
name: filter_chain_id
in: path
Expand All @@ -250,6 +252,13 @@ components:
description: |
After filter could be used to request audit log data that was recorded after certain time (inclusive).
It can either be a timestamp as Unix Epoch or a string following RFC3339 Schema (without fractions of a second) - ex: '2024-04-25T15:03:24Z'
list_consumers:
description: Indicates whether the list of consumers should be included in the consumer group details.
in: query
name: list_consumers
schema:
default: true
type: boolean
schemas:
UnauthorizedError:
type: object
Expand Down Expand Up @@ -10476,6 +10485,7 @@ paths:
'/consumer_groups/{group_name_or_id}':
parameters:
- $ref: '#/components/parameters/group_name_or_id'
- $ref: '#/components/parameters/list_consumers'
get:
summary: List a specific consumer group
responses:
Expand Down Expand Up @@ -13111,6 +13121,69 @@ paths:
$ref: '#/components/responses/HTTP401Error'
operationId: get-admins-name_or_id-workspaces
description: Return workspaces associated with an admin.
'/admins/{name_or_id}/workspaces/{workspace_name_or_id}':
parameters:
- schema:
type: string
name: name_or_id
in: path
required: true
description: The admin’s username or ID
- schema:
type: string
name: workspace_name_or_id
in: path
required: true
description: The name or ID of the admin's new workspace.
patch:
summary: Update an Admin's Workspace
tags:
- admins
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
created_at:
type: integer
id:
type: string
updated_at:
type: integer
status:
type: integer
username:
type: string
email:
type: string
rbac_token_enabled:
type: boolean
x-examples:
Example 1:
created_at: 1556638385
id: 665b4070-541f-48bf-82c1-53030babaa81
updated_at: 1556638385
status: 4
username: test-admin
email: [email protected]
rbac_token_enabled: true
examples:
Example response body:
value:
created_at: 1556638385
id: 665b4070-541f-48bf-82c1-53030babaa81
updated_at: 1556638385
status: 4
username: test-admin
email: [email protected]
rbac_token_enabled: true
'401':
$ref: '#/components/responses/HTTP401Error'
operationId: patch-admins-name_or_id-workspaces-workspace_name_or_id
description: Change the `belong_workspace` property for the specified admin.
/groups:
get:
summary: List Groups
Expand Down Expand Up @@ -16158,6 +16231,64 @@ paths:
tags:
- cache

'/config':
post:
summary: Apply Declarative Config
tags:
- config
responses:
'201':
description: Created
content:
application/json:
schema:
type: object
requestBody:
content:
application/json:
schema:
type: object
application/yaml:
schema:
type: object
example: |
services:
- name: example-service
url: http://example.com
routes:
- name: example-route
paths:
- /example
multipart/form-data:
schema:
type: object
properties:
config:
type: string
format: binary
example: /path/to/<config-file>
description: Configuration file in JSON or YAML.
operationId: post-config
description: |
Apply a configuration from a declarative JSON or YAML file. Any existing configuration will be overwritten. Note: This API is only available in DB-less mode.
get:
summary: Get Declarative Config
operationId: get-config
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
config:
type: string
tags:
- config
description: |
Get the current configuration. Note: This API is only available in DB-less mode.

servers:
- description: Default Admin API URL
url: '{protocol}://{hostname}:{port}{path}'
Expand Down Expand Up @@ -16344,3 +16475,6 @@ tags:
- description: |
Querying and managing cache entries.
name: cache
- description: |
Apply and retrieve declarative configuration when using DB-less mode.
name: config
2 changes: 2 additions & 0 deletions api-specs/Gateway-EE/latest/kong-ee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ components:
name: tags
schema:
type: string
nullable: false
certificate_name_or_id:
name: certificate_name_or_id
in: path
Expand Down Expand Up @@ -225,6 +226,7 @@ components:
name: tags
schema:
type: string
nullable: false
filter_chain_id:
name: filter_chain_id
in: path
Expand Down
2 changes: 1 addition & 1 deletion api-specs/Gateway-OSS/3.7/kong-oss-3.7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8025,7 +8025,7 @@ tags:
Most core entities can be tagged via the tags attribute upon creation or modification.
name: Tags
- description: |
Retreieve information about the status of data planes when Kong Gateway is configured in hybrid mode.
Retrieve information about the status of data planes when Kong Gateway is configured in hybrid mode.
name: clustering
- description: |
Querying and managing cache entries.
Expand Down
3 changes: 2 additions & 1 deletion api-specs/Gateway-OSS/3.8/kong-oss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ components:
name: tags
schema:
type: string
nullable: false
service_id_or_name:
name: service_id_or_name
description: ID **or** name of the service to lookup
Expand Down Expand Up @@ -8076,7 +8077,7 @@ tags:
Most core entities can be tagged via the tags attribute upon creation or modification.
name: Tags
- description: |
Retreieve information about the status of data planes when Kong Gateway is configured in hybrid mode.
Retrieve information about the status of data planes when Kong Gateway is configured in hybrid mode.
name: clustering
- description: |
Querying and managing cache entries.
Expand Down
64 changes: 63 additions & 1 deletion api-specs/Gateway-OSS/3.9/kong-oss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ components:
name: tags
schema:
type: string
nullable: false
service_id_or_name:
name: service_id_or_name
description: ID **or** name of the service to lookup
Expand Down Expand Up @@ -7960,6 +7961,64 @@ paths:
description: All cache entries purged successfully.
tags:
- cache

'/config':
post:
summary: Apply Declarative Config
tags:
- config
responses:
'201':
description: Created
content:
application/json:
schema:
type: object
requestBody:
content:
application/json:
schema:
type: object
application/yaml:
schema:
type: object
example: |
services:
- name: example-service
url: http://example.com
routes:
- name: example-route
paths:
- /example
multipart/form-data:
schema:
type: object
properties:
config:
type: string
format: binary
example: /path/to/<config-file>
description: Configuration file in JSON or YAML.
operationId: post-config
description: |
Apply a configuration from a declarative JSON or YAML file. Any existing configuration will be overwritten. Note: This API is only available in DB-less mode.
get:
summary: Get Declarative Config
operationId: get-config
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
config:
type: string
tags:
- config
description: |
Get the current configuration. Note: This API is only available in DB-less mode.
servers:
- description: Default Admin API URL
url: '{protocol}://{hostname}:{port}{path}'
Expand Down Expand Up @@ -8076,8 +8135,11 @@ tags:
Most core entities can be tagged via the tags attribute upon creation or modification.
name: Tags
- description: |
Retreieve information about the status of data planes when Kong Gateway is configured in hybrid mode.
Retrieve information about the status of data planes when Kong Gateway is configured in hybrid mode.
name: clustering
- description: |
Querying and managing cache entries.
name: cache
- description: |
Apply and retrieve declarative configuration when using DB-less mode.
name: config
3 changes: 2 additions & 1 deletion api-specs/Gateway-OSS/latest/kong-oss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ components:
name: tags
schema:
type: string
nullable: false
service_id_or_name:
name: service_id_or_name
description: ID **or** name of the service to lookup
Expand Down Expand Up @@ -8076,7 +8077,7 @@ tags:
Most core entities can be tagged via the tags attribute upon creation or modification.
name: Tags
- description: |
Retreieve information about the status of data planes when Kong Gateway is configured in hybrid mode.
Retrieve information about the status of data planes when Kong Gateway is configured in hybrid mode.
name: clustering
- description: |
Querying and managing cache entries.
Expand Down

0 comments on commit f2c732b

Please sign in to comment.