Skip to content

Commit

Permalink
Update Swagger REST API doc
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-github-robot authored and web-flow committed Apr 30, 2024
1 parent 49e6f58 commit 512b4b5
Show file tree
Hide file tree
Showing 3 changed files with 420 additions and 50 deletions.
181 changes: 163 additions & 18 deletions src/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Package docs GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag
// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs

import "github.com/swaggo/swag"
Expand Down Expand Up @@ -8462,7 +8461,11 @@ const docTemplate = `{
},
"requestInfo": {
"description": "Extracted information about the request.",
"$ref": "#/definitions/common.RequestInfo"
"allOf": [
{
"$ref": "#/definitions/common.RequestInfo"
}
]
},
"responseData": {
"description": "The data sent back in response to the request."
Expand Down Expand Up @@ -8627,6 +8630,34 @@ const docTemplate = `{
}
}
},
"mcir.CustomImageStatus": {
"type": "string",
"enum": [
"Available",
"Unavailable"
],
"x-enum-varnames": [
"MyImageAvailable",
"MyImageUnavailable"
]
},
"mcir.DiskStatus": {
"type": "string",
"enum": [
"Creating",
"Available",
"Attached",
"Deleting",
"Error"
],
"x-enum-varnames": [
"DiskCreating",
"DiskAvailable",
"DiskAttached",
"DiskDeleting",
"DiskError"
]
},
"mcir.FilterSpecsByRangeRequest": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -8892,7 +8923,11 @@ const docTemplate = `{
},
"iid": {
"description": "Fields for response",
"$ref": "#/definitions/common.IID"
"allOf": [
{
"$ref": "#/definitions/common.IID"
}
]
},
"keyValueList": {
"type": "array",
Expand Down Expand Up @@ -9043,7 +9078,11 @@ const docTemplate = `{
"example": "aws-ap-southeast-1-1"
},
"status": {
"type": "string",
"allOf": [
{
"$ref": "#/definitions/mcir.CustomImageStatus"
}
],
"example": "Available"
},
"systemLabel": {
Expand Down Expand Up @@ -9133,7 +9172,11 @@ const docTemplate = `{
},
"status": {
"description": "Available, Unavailable, Attached, ...",
"type": "string",
"allOf": [
{
"$ref": "#/definitions/mcir.DiskStatus"
}
],
"example": "Available"
},
"systemLabel": {
Expand Down Expand Up @@ -9865,7 +9908,11 @@ const docTemplate = `{
},
"postCommand": {
"description": "PostCommand is field for providing command to VMs after its creation. example:\"wget https://raw.githubusercontent.com/cloud-barista/cb-tumblebug/main/scripts/setweb.sh -O ~/setweb.sh; chmod +x ~/setweb.sh; sudo ~/setweb.sh\"",
"$ref": "#/definitions/mcis.McisCmdReq"
"allOf": [
{
"$ref": "#/definitions/mcis.McisCmdReq"
}
]
},
"vmDynamicReq": {
"$ref": "#/definitions/mcis.TbVmDynamicReq"
Expand Down Expand Up @@ -9983,6 +10030,23 @@ const docTemplate = `{
}
}
},
"mcis.ClusterStatus": {
"type": "string",
"enum": [
"Creating",
"Active",
"Inactive",
"Updating",
"Deleting"
],
"x-enum-varnames": [
"ClusterCreating",
"ClusterActive",
"ClusterInactive",
"ClusterUpdating",
"ClusterDeleting"
]
},
"mcis.DeploymentPlan": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -10376,6 +10440,23 @@ const docTemplate = `{
}
}
},
"mcis.NodeGroupStatus": {
"type": "string",
"enum": [
"Creating",
"Active",
"Inactive",
"Updating",
"Deleting"
],
"x-enum-varnames": [
"NodeGroupCreating",
"NodeGroupActive",
"NodeGroupInactive",
"NodeGroupUpdating",
"NodeGroupDeleting"
]
},
"mcis.Operation": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -10607,6 +10688,17 @@ const docTemplate = `{
}
}
},
"mcis.SpiderImageType": {
"type": "string",
"enum": [
"PublicImage",
"MyImage"
],
"x-enum-varnames": [
"PublicImage",
"MyImage"
]
},
"mcis.SpiderVMInfo": {
"type": "object",
"properties": {
Expand All @@ -10628,7 +10720,11 @@ const docTemplate = `{
},
"iid": {
"description": "Fields for response",
"$ref": "#/definitions/common.IID"
"allOf": [
{
"$ref": "#/definitions/common.IID"
}
]
},
"imageIId": {
"$ref": "#/definitions/common.IID"
Expand All @@ -10637,7 +10733,7 @@ const docTemplate = `{
"type": "string"
},
"imageType": {
"type": "string"
"$ref": "#/definitions/mcis.SpiderImageType"
},
"keyPairIId": {
"$ref": "#/definitions/common.IID"
Expand Down Expand Up @@ -10673,7 +10769,11 @@ const docTemplate = `{
},
"region": {
"description": "ex) {us-east1, us-east1-c} or {ap-northeast-2}",
"$ref": "#/definitions/mcis.RegionInfo"
"allOf": [
{
"$ref": "#/definitions/mcis.RegionInfo"
}
]
},
"rootDeviceName": {
"description": "\"/dev/sda1\", ...",
Expand Down Expand Up @@ -10708,7 +10808,11 @@ const docTemplate = `{
},
"subnetIID": {
"description": "AWS, ex) subnet-8c4a53e4",
"$ref": "#/definitions/common.IID"
"allOf": [
{
"$ref": "#/definitions/common.IID"
}
]
},
"subnetName": {
"type": "string"
Expand Down Expand Up @@ -10885,7 +10989,11 @@ const docTemplate = `{
},
"status": {
"description": "Creating, Active, Inactive, Updating, Deleting",
"type": "string",
"allOf": [
{
"$ref": "#/definitions/mcis.ClusterStatus"
}
],
"example": "Creating"
},
"systemLabel": {
Expand Down Expand Up @@ -10981,7 +11089,11 @@ const docTemplate = `{
},
"status": {
"description": "---",
"type": "string",
"allOf": [
{
"$ref": "#/definitions/mcis.NodeGroupStatus"
}
],
"example": "Creating"
}
}
Expand Down Expand Up @@ -11408,11 +11520,19 @@ const docTemplate = `{
},
"healthChecker": {
"description": "HealthChecker",
"$ref": "#/definitions/mcis.TbNLBHealthCheckerReq"
"allOf": [
{
"$ref": "#/definitions/mcis.TbNLBHealthCheckerReq"
}
]
},
"listener": {
"description": "Frontend",
"$ref": "#/definitions/mcis.NLBListenerReq"
"allOf": [
{
"$ref": "#/definitions/mcis.NLBListenerReq"
}
]
},
"scope": {
"description": "REGION(V) | GLOBAL",
Expand All @@ -11425,7 +11545,11 @@ const docTemplate = `{
},
"targetGroup": {
"description": "Backend",
"$ref": "#/definitions/mcis.TbNLBTargetGroupReq"
"allOf": [
{
"$ref": "#/definitions/mcis.TbNLBTargetGroupReq"
}
]
},
"type": {
"description": "PUBLIC(V) | INTERNAL",
Expand Down Expand Up @@ -11664,7 +11788,11 @@ const docTemplate = `{
},
"region": {
"description": "AWS, ex) {us-east1, us-east1-c} or {ap-northeast-2}",
"$ref": "#/definitions/mcis.RegionInfo"
"allOf": [
{
"$ref": "#/definitions/mcis.RegionInfo"
}
]
},
"rootDeviceName": {
"type": "string"
Expand Down Expand Up @@ -12104,14 +12232,29 @@ const docTemplate = `{
"type": "object",
"properties": {
"type": {
"type": "string",
"allOf": [
{
"$ref": "#/definitions/netutil.SubnettingRuleType"
}
],
"example": "minSubnets"
},
"value": {
"type": "integer",
"example": 2
}
}
},
"netutil.SubnettingRuleType": {
"type": "string",
"enum": [
"minSubnets",
"minHosts"
],
"x-enum-varnames": [
"SubnettingRuleTypeMinSubnets",
"SubnettingRuleTypeMinHosts"
]
}
},
"securityDefinitions": {
Expand All @@ -12131,6 +12274,8 @@ var SwaggerInfo = &swag.Spec{
Description: "CB-Tumblebug REST API",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}

func init() {
Expand Down
Loading

0 comments on commit 512b4b5

Please sign in to comment.