Skip to content

Commit

Permalink
Update some K8sCluster API's swagger comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-github-robot authored Jun 25, 2024
2 parents 74ebef3 + 30d9205 commit 9e6f695
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 0 deletions.
57 changes: 57 additions & 0 deletions src/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2305,6 +2305,15 @@ const docTemplate = `{
"name": "k8sNodeGroupName",
"in": "path",
"required": true
},
{
"description": "Details of the TbChangeK8sNodeGroupAutoscaleSizeReq object",
"name": "changeK8sNodeGroupAutoscaleSizeReq",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mcis.TbChangeK8sNodeGroupAutoscaleSizeReq"
}
}
],
"responses": {
Expand Down Expand Up @@ -2365,6 +2374,15 @@ const docTemplate = `{
"name": "k8sNodeGroupName",
"in": "path",
"required": true
},
{
"description": "Details of the TbSetK8sNodeGroupAutoscalingReq object",
"name": "setK8sNodeGroupAutoscalingReq",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mcis.TbSetK8sNodeGroupAutoscalingReq"
}
}
],
"responses": {
Expand Down Expand Up @@ -2418,6 +2436,15 @@ const docTemplate = `{
"name": "k8sClusterId",
"in": "path",
"required": true
},
{
"description": "Details of the TbUpgradeK8sClusterReq object",
"name": "upgradeK8sClusterReq",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mcis.TbUpgradeK8sClusterReq"
}
}
],
"responses": {
Expand Down Expand Up @@ -11732,6 +11759,20 @@ const docTemplate = `{
}
}
},
"mcis.TbChangeK8sNodeGroupAutoscaleSizeReq": {
"type": "object",
"properties": {
"desiredNodeSize": {
"type": "string"
},
"maxNodeSize": {
"type": "string"
},
"minNodeSize": {
"type": "string"
}
}
},
"mcis.TbIdNameInDetailInfo": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -12513,6 +12554,22 @@ const docTemplate = `{
}
}
},
"mcis.TbSetK8sNodeGroupAutoscalingReq": {
"type": "object",
"properties": {
"onAutoScaling": {
"type": "string"
}
}
},
"mcis.TbUpgradeK8sClusterReq": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"mcis.TbVmDynamicReq": {
"type": "object",
"required": [
Expand Down
57 changes: 57 additions & 0 deletions src/api/rest/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2298,6 +2298,15 @@
"name": "k8sNodeGroupName",
"in": "path",
"required": true
},
{
"description": "Details of the TbChangeK8sNodeGroupAutoscaleSizeReq object",
"name": "changeK8sNodeGroupAutoscaleSizeReq",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mcis.TbChangeK8sNodeGroupAutoscaleSizeReq"
}
}
],
"responses": {
Expand Down Expand Up @@ -2358,6 +2367,15 @@
"name": "k8sNodeGroupName",
"in": "path",
"required": true
},
{
"description": "Details of the TbSetK8sNodeGroupAutoscalingReq object",
"name": "setK8sNodeGroupAutoscalingReq",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mcis.TbSetK8sNodeGroupAutoscalingReq"
}
}
],
"responses": {
Expand Down Expand Up @@ -2411,6 +2429,15 @@
"name": "k8sClusterId",
"in": "path",
"required": true
},
{
"description": "Details of the TbUpgradeK8sClusterReq object",
"name": "upgradeK8sClusterReq",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mcis.TbUpgradeK8sClusterReq"
}
}
],
"responses": {
Expand Down Expand Up @@ -11725,6 +11752,20 @@
}
}
},
"mcis.TbChangeK8sNodeGroupAutoscaleSizeReq": {
"type": "object",
"properties": {
"desiredNodeSize": {
"type": "string"
},
"maxNodeSize": {
"type": "string"
},
"minNodeSize": {
"type": "string"
}
}
},
"mcis.TbIdNameInDetailInfo": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -12506,6 +12547,22 @@
}
}
},
"mcis.TbSetK8sNodeGroupAutoscalingReq": {
"type": "object",
"properties": {
"onAutoScaling": {
"type": "string"
}
}
},
"mcis.TbUpgradeK8sClusterReq": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"mcis.TbVmDynamicReq": {
"type": "object",
"required": [
Expand Down
37 changes: 37 additions & 0 deletions src/api/rest/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1926,6 +1926,15 @@ definitions:
description: CountUndefined is for counting Undefined
type: integer
type: object
mcis.TbChangeK8sNodeGroupAutoscaleSizeReq:
properties:
desiredNodeSize:
type: string
maxNodeSize:
type: string
minNodeSize:
type: string
type: object
mcis.TbIdNameInDetailInfo:
properties:
idInCsp:
Expand Down Expand Up @@ -2498,6 +2507,16 @@ definitions:
required:
- numVMsToAdd
type: object
mcis.TbSetK8sNodeGroupAutoscalingReq:
properties:
onAutoScaling:
type: string
type: object
mcis.TbUpgradeK8sClusterReq:
properties:
version:
type: string
type: object
mcis.TbVmDynamicReq:
properties:
commonImage:
Expand Down Expand Up @@ -4632,6 +4651,12 @@ paths:
name: k8sNodeGroupName
required: true
type: string
- description: Details of the TbChangeK8sNodeGroupAutoscaleSizeReq object
in: body
name: changeK8sNodeGroupAutoscaleSizeReq
required: true
schema:
$ref: '#/definitions/mcis.TbChangeK8sNodeGroupAutoscaleSizeReq'
produces:
- application/json
responses:
Expand Down Expand Up @@ -4673,6 +4698,12 @@ paths:
name: k8sNodeGroupName
required: true
type: string
- description: Details of the TbSetK8sNodeGroupAutoscalingReq object
in: body
name: setK8sNodeGroupAutoscalingReq
required: true
schema:
$ref: '#/definitions/mcis.TbSetK8sNodeGroupAutoscalingReq'
produces:
- application/json
responses:
Expand Down Expand Up @@ -4709,6 +4740,12 @@ paths:
name: k8sClusterId
required: true
type: string
- description: Details of the TbUpgradeK8sClusterReq object
in: body
name: upgradeK8sClusterReq
required: true
schema:
$ref: '#/definitions/mcis.TbUpgradeK8sClusterReq'
produces:
- application/json
responses:
Expand Down
3 changes: 3 additions & 0 deletions src/api/rest/server/mcis/k8scluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ func RestDeleteK8sNodeGroup(c echo.Context) error {
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param k8sClusterId path string true "K8sCluster ID"
// @Param k8sNodeGroupName path string true "K8sNodeGroup Name"
// @Param setK8sNodeGroupAutoscalingReq body mcis.TbSetK8sNodeGroupAutoscalingReq true "Details of the TbSetK8sNodeGroupAutoscalingReq object"
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
// @Failure 500 {object} common.SimpleMsg
Expand Down Expand Up @@ -265,6 +266,7 @@ func RestPutSetK8sNodeGroupAutoscaling(c echo.Context) error {
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param k8sClusterId path string true "K8sCluster ID"
// @Param k8sNodeGroupName path string true "K8sNodeGroup Name"
// @Param changeK8sNodeGroupAutoscaleSizeReq body mcis.TbChangeK8sNodeGroupAutoscaleSizeReq true "Details of the TbChangeK8sNodeGroupAutoscaleSizeReq object"
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
// @Failure 500 {object} common.SimpleMsg
Expand Down Expand Up @@ -452,6 +454,7 @@ func RestDeleteAllK8sCluster(c echo.Context) error {
// @Produce json
// @Param nsId path string true "Namespace ID" default(ns01)
// @Param k8sClusterId path string true "K8sCluster ID"
// @Param upgradeK8sClusterReq body mcis.TbUpgradeK8sClusterReq true "Details of the TbUpgradeK8sClusterReq object"
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
// @Failure 500 {object} common.SimpleMsg
Expand Down

0 comments on commit 9e6f695

Please sign in to comment.