Skip to content

Commit

Permalink
Update API docs for MCIS control
Browse files Browse the repository at this point in the history
* Use string type for success responses of
  - `GET /ns/{nsId}/control/mcis/{mcisId}`
  - `GET /ns/{nsId}/control/mcis/{mcisId}/vm/{vmId}`
  • Loading branch information
yunkon-kim committed May 3, 2024
1 parent 9d54407 commit ef3b720
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2044,7 +2044,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
"type": "string"
}
},
"404": {
Expand Down Expand Up @@ -2128,7 +2128,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
"type": "string"
}
},
"404": {
Expand Down
4 changes: 2 additions & 2 deletions src/api/rest/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
"type": "string"
}
},
"404": {
Expand Down Expand Up @@ -2121,7 +2121,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
"type": "string"
}
},
"404": {
Expand Down
4 changes: 2 additions & 2 deletions src/api/rest/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4244,7 +4244,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/common.SimpleMsg'
type: string
"404":
description: Not Found
schema:
Expand Down Expand Up @@ -4303,7 +4303,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/common.SimpleMsg'
type: string
"404":
description: Not Found
schema:
Expand Down
4 changes: 2 additions & 2 deletions src/api/rest/server/mcis/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
// @Param mcisId path string true "MCIS ID" default(mcis01)
// @Param action query string true "Action to MCIS" Enums(suspend, resume, reboot, terminate, refine)
// @Param force query string false "Force control to skip checking controllable status" Enums(false, true)
// @Success 200 {object} common.SimpleMsg
// @Success 200 {string} string
// @Failure 404 {object} common.SimpleMsg
// @Failure 500 {object} common.SimpleMsg
// @Router /ns/{nsId}/control/mcis/{mcisId} [get]
Expand Down Expand Up @@ -74,7 +74,7 @@ func RestGetControlMcis(c echo.Context) error {
// @Param vmId path string true "VM ID" default(g1-1)
// @Param action query string true "Action to MCIS" Enums(suspend, resume, reboot, terminate)
// @Param force query string false "Force control to skip checking controllable status" Enums(false, true)
// @Success 200 {object} common.SimpleMsg
// @Success 200 {string} string
// @Failure 404 {object} common.SimpleMsg
// @Failure 500 {object} common.SimpleMsg
// @Router /ns/{nsId}/control/mcis/{mcisId}/vm/{vmId} [get]
Expand Down

0 comments on commit ef3b720

Please sign in to comment.