Skip to content

Commit

Permalink
fix(api-docs): fixed missing path parameters in obproxy api docs (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
powerfooI authored May 22, 2024
1 parent 1e38756 commit 29e8f00
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 0 deletions.
46 changes: 46 additions & 0 deletions internal/dashboard/generated/swagger/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2998,6 +2998,22 @@ const docTemplate = `{
],
"summary": "Get OBProxy",
"operationId": "GetOBProxy",
"parameters": [
{
"type": "string",
"description": "namespace of obproxy deployment",
"name": "namespace",
"in": "path",
"required": true
},
{
"type": "string",
"description": "name of obproxy deployment",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
Expand Down Expand Up @@ -3055,6 +3071,22 @@ const docTemplate = `{
],
"summary": "Delete OBProxy",
"operationId": "DeleteOBProxy",
"parameters": [
{
"type": "string",
"description": "namespace of obproxy deployment",
"name": "namespace",
"in": "path",
"required": true
},
{
"type": "string",
"description": "name of obproxy deployment",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
Expand Down Expand Up @@ -3121,6 +3153,20 @@ const docTemplate = `{
"schema": {
"$ref": "#/definitions/obproxy.PatchOBProxyParam"
}
},
{
"type": "string",
"description": "namespace of obproxy deployment",
"name": "namespace",
"in": "path",
"required": true
},
{
"type": "string",
"description": "name of obproxy deployment",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
Expand Down
46 changes: 46 additions & 0 deletions internal/dashboard/generated/swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2991,6 +2991,22 @@
],
"summary": "Get OBProxy",
"operationId": "GetOBProxy",
"parameters": [
{
"type": "string",
"description": "namespace of obproxy deployment",
"name": "namespace",
"in": "path",
"required": true
},
{
"type": "string",
"description": "name of obproxy deployment",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
Expand Down Expand Up @@ -3048,6 +3064,22 @@
],
"summary": "Delete OBProxy",
"operationId": "DeleteOBProxy",
"parameters": [
{
"type": "string",
"description": "namespace of obproxy deployment",
"name": "namespace",
"in": "path",
"required": true
},
{
"type": "string",
"description": "name of obproxy deployment",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
Expand Down Expand Up @@ -3114,6 +3146,20 @@
"schema": {
"$ref": "#/definitions/obproxy.PatchOBProxyParam"
}
},
{
"type": "string",
"description": "namespace of obproxy deployment",
"name": "namespace",
"in": "path",
"required": true
},
{
"type": "string",
"description": "name of obproxy deployment",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
Expand Down
32 changes: 32 additions & 0 deletions internal/dashboard/generated/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4086,6 +4086,17 @@ paths:
- application/json
description: Delete OBProxy by namespace and name
operationId: DeleteOBProxy
parameters:
- description: namespace of obproxy deployment
in: path
name: namespace
required: true
type: string
- description: name of obproxy deployment
in: path
name: name
required: true
type: string
produces:
- application/json
responses:
Expand Down Expand Up @@ -4120,6 +4131,17 @@ paths:
- application/json
description: Get OBProxy by namespace and name
operationId: GetOBProxy
parameters:
- description: namespace of obproxy deployment
in: path
name: namespace
required: true
type: string
- description: name of obproxy deployment
in: path
name: name
required: true
type: string
produces:
- application/json
responses:
Expand Down Expand Up @@ -4161,6 +4183,16 @@ paths:
required: true
schema:
$ref: '#/definitions/obproxy.PatchOBProxyParam'
- description: namespace of obproxy deployment
in: path
name: namespace
required: true
type: string
- description: name of obproxy deployment
in: path
name: name
required: true
type: string
produces:
- application/json
responses:
Expand Down
6 changes: 6 additions & 0 deletions internal/dashboard/handler/obproxy_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ func CreateOBProxy(c *gin.Context) (*obproxy.OBProxy, error) {
// @Tags OBProxy
// @Accept application/json
// @Produce application/json
// @Param namespace path string true "namespace of obproxy deployment"
// @Param name path string true "name of obproxy deployment"
// @Success 200 object response.APIResponse{data=obproxy.OBProxy}
// @Failure 400 object response.APIResponse
// @Failure 401 object response.APIResponse
Expand All @@ -89,6 +91,8 @@ func GetOBProxy(c *gin.Context) (*obproxy.OBProxy, error) {
// @Accept application/json
// @Produce application/json
// @Param body body obproxy.PatchOBProxyParam true "Request body for patching obproxy"
// @Param namespace path string true "namespace of obproxy deployment"
// @Param name path string true "name of obproxy deployment"
// @Success 200 object response.APIResponse{data=obproxy.OBProxy}
// @Failure 400 object response.APIResponse
// @Failure 401 object response.APIResponse
Expand All @@ -115,6 +119,8 @@ func PatchOBProxy(c *gin.Context) (*obproxy.OBProxy, error) {
// @Tags OBProxy
// @Accept application/json
// @Produce application/json
// @Param namespace path string true "namespace of obproxy deployment"
// @Param name path string true "name of obproxy deployment"
// @Success 200 object response.APIResponse{data=obproxy.OBProxy}
// @Failure 400 object response.APIResponse
// @Failure 401 object response.APIResponse
Expand Down

0 comments on commit 29e8f00

Please sign in to comment.