Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix api validation warning #1766

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading