Skip to content

Commit

Permalink
chore(oapi): add missing bits to fix validation errors in parent project
Browse files Browse the repository at this point in the history
Signed-off-by: slonka <[email protected]>
  • Loading branch information
slonka committed Jan 9, 2025
1 parent a501773 commit 1c9a4e1
Show file tree
Hide file tree
Showing 49 changed files with 355 additions and 23 deletions.
6 changes: 6 additions & 0 deletions api/mesh/v1alpha1/mesh/rest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ info:
paths:
/meshes/{name}:
get:
operationId: get-Mesh
summary: Returns Mesh entity
tags: [ "Mesh" ]
parameters:
Expand All @@ -22,6 +23,7 @@ paths:
$ref: "#/components/responses/MeshItem"

put:
operationId: create-or-update-Mesh
summary: Creates or Updates Mesh entity
tags: [ "Mesh" ]
parameters:
Expand Down Expand Up @@ -53,6 +55,7 @@ paths:
$ref: '#/components/schemas/MeshCreateOrUpdateSuccessResponse'

delete:
operationId: delete-Mesh
summary: Deletes Mesh entity
tags: [ "Mesh" ]
parameters:
Expand All @@ -65,9 +68,12 @@ paths:
responses:
'200':
description: Successful response
'404':
$ref: "/specs/base/specs/common/error_schema.yaml#/components/responses/NotFound"

/meshes:
get:
operationId: get-Mesh-list
summary: Returns a list of Mesh in the mesh.
tags: [ "Mesh" ]
responses:
Expand Down
6 changes: 6 additions & 0 deletions api/mesh/v1alpha1/meshgateway/rest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ info:
paths:
/meshes/{mesh}/meshgateways/{name}:
get:
operationId: get-MeshGateway
summary: Returns MeshGateway entity
tags: [ "MeshGateway" ]
parameters:
Expand All @@ -28,6 +29,7 @@ paths:
$ref: "#/components/responses/MeshGatewayItem"

put:
operationId: create-or-update-MeshGateway
summary: Creates or Updates MeshGateway entity
tags: [ "MeshGateway" ]
parameters:
Expand Down Expand Up @@ -65,6 +67,7 @@ paths:
$ref: '#/components/schemas/MeshGatewayCreateOrUpdateSuccessResponse'

delete:
operationId: delete-MeshGateway
summary: Deletes MeshGateway entity
tags: [ "MeshGateway" ]
parameters:
Expand All @@ -83,9 +86,12 @@ paths:
responses:
'200':
description: Successful response
'404':
$ref: "/specs/base/specs/common/error_schema.yaml#/components/responses/NotFound"

/meshes/{mesh}/meshgateways:
get:
operationId: get-MeshGateway-list
summary: Returns a list of MeshGateway in the mesh.
tags: [ "MeshGateway" ]
parameters:
Expand Down
2 changes: 2 additions & 0 deletions api/openapi/specs/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ paths:
- in: path
name: resourceType
example: dataplanes
required: true
schema:
type: string
enum: [dataplanes, meshgateways]
Expand All @@ -80,6 +81,7 @@ paths:
$ref: '#/components/responses/Internal'
/meshes/{mesh}/dataplanes/{name}/_config:
get:
operationId: get-meshes-mesh-dataplanes-name-config
summary: Get a proxy XDS config on a CP
description: Returns the configuration of the proxy ([xds](https://www.envoyproxy.io/docs/envoy/latest/api-docs/xds_protocol) configuration).
parameters:
Expand Down
24 changes: 23 additions & 1 deletion api/openapi/specs/common/error_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,26 @@ components:
type: array
description: TODO
items:
$ref: "#/components/schemas/InvalidParameters"
$ref: "#/components/schemas/InvalidParameters"
NotFoundError:
allOf:
- $ref: '#/components/schemas/Error'
- type: object
properties:
status:
example: 404
title:
example: Not Found
type:
example: https://httpstatuses.com/404
instance:
example: kong:trace:1234567890
detail:
example: Not found
responses:
NotFound:
description: Not Found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/NotFoundError'
15 changes: 15 additions & 0 deletions api/openapi/types/common/zz_generated.error_schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1c9a4e1

Please sign in to comment.