Skip to content

Commit

Permalink
Fix api validation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-github-robot authored Aug 23, 2024
2 parents 125651d + 4e4e77e commit 2e980a6
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
9 changes: 8 additions & 1 deletion src/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3625,7 +3625,7 @@ const docTemplate = `{
"required": true
},
{
"description": "VMs to add to NLB",
"description": "Select VMs to remove from NLB",
"name": "nlbAddRemoveVMReq",
"in": "body",
"required": true,
Expand Down Expand Up @@ -6834,6 +6834,13 @@ const docTemplate = `{
"in": "path",
"required": true
},
{
"type": "string",
"description": "Security Group ID",
"name": "securityGroupId",
"in": "path",
"required": true
},
{
"description": "FirewallRules to create",
"name": "firewallRuleReq",
Expand Down
9 changes: 8 additions & 1 deletion src/api/rest/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3618,7 +3618,7 @@
"required": true
},
{
"description": "VMs to add to NLB",
"description": "Select VMs to remove from NLB",
"name": "nlbAddRemoveVMReq",
"in": "body",
"required": true,
Expand Down Expand Up @@ -6827,6 +6827,13 @@
"in": "path",
"required": true
},
{
"type": "string",
"description": "Security Group ID",
"name": "securityGroupId",
"in": "path",
"required": true
},
{
"description": "FirewallRules to create",
"name": "firewallRuleReq",
Expand Down
7 changes: 6 additions & 1 deletion src/api/rest/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5641,7 +5641,7 @@ paths:
name: nlbId
required: true
type: string
- description: VMs to add to NLB
- description: Select VMs to remove from NLB
in: body
name: nlbAddRemoveVMReq
required: true
Expand Down Expand Up @@ -7913,6 +7913,11 @@ paths:
name: nsId
required: true
type: string
- description: Security Group ID
in: path
name: securityGroupId
required: true
type: string
- description: FirewallRules to create
in: body
name: firewallRuleReq
Expand Down
2 changes: 1 addition & 1 deletion src/api/rest/server/infra/nlb.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func RestAddNLBVMs(c echo.Context) error {
// @Param nsId path string true "Namespace ID" default(default)
// @Param mciId path string true "MCI ID" default(mci01)
// @Param nlbId path string true "NLB ID" default(g1)
// @Param nlbAddRemoveVMReq body infra.TbNLBAddRemoveVMReq true "VMs to add to NLB"
// @Param nlbAddRemoveVMReq body infra.TbNLBAddRemoveVMReq true "Select VMs to remove from NLB"
// @Success 200 {object} common.SimpleMsg
// @Failure 404 {object} common.SimpleMsg
// @Router /ns/{nsId}/mci/{mciId}/nlb/{nlbId}/vm [delete]
Expand Down
1 change: 1 addition & 0 deletions src/api/rest/server/resource/firewallrule.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type TbFirewallRulesWrapper struct {
// @Accept json
// @Produce json
// @Param nsId path string true "Namespace ID" default(default)
// @Param securityGroupId path string true "Security Group ID"
// @Param firewallRuleReq body TbFirewallRulesWrapper true "FirewallRules to create"
// @Success 200 {object} resource.TbSecurityGroupInfo
// @Failure 404 {object} common.SimpleMsg
Expand Down

0 comments on commit 2e980a6

Please sign in to comment.