Skip to content

Commit

Permalink
Merge pull request #1095 from cloud-barista/update-swagger-doc
Browse files Browse the repository at this point in the history
[Workflow] Update Swagger REST API doc
  • Loading branch information
seokho-son authored May 7, 2022
2 parents 4f5d44f + 9b0af30 commit 59dc654
Show file tree
Hide file tree
Showing 3 changed files with 262 additions and 0 deletions.
98 changes: 98 additions & 0 deletions src/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,41 @@ const docTemplate = `{
}
}
},
"/inspectResourcesOverview": {
"get": {
"description": "Inspect Resources Overview (vNet, securityGroup, sshKey, vm) registered in CB-Tumblebug and CSP for all connections",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"[Admin] System management"
],
"summary": "Inspect Resources Overview (vNet, securityGroup, sshKey, vm) registered in CB-Tumblebug and CSP for all connections",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/mcis.InspectResourceAllResult"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
}
}
}
}
},
"/loadCommonResource": {
"get": {
"description": "Load Common Resources from internal asset files (Spec, Image)",
Expand Down Expand Up @@ -6400,6 +6435,52 @@ const docTemplate = `{
}
}
},
"mcis.InspectResourceAllResult": {
"type": "object",
"properties": {
"availableConnection": {
"type": "integer"
},
"cspTotalOverview": {
"$ref": "#/definitions/mcis.inspectOverview"
},
"elapsedTime": {
"type": "integer"
},
"inspectResult": {
"type": "array",
"items": {
"$ref": "#/definitions/mcis.InspectResourceResult"
}
},
"registeredConnection": {
"type": "integer"
},
"tumblebugOverview": {
"$ref": "#/definitions/mcis.inspectOverview"
}
}
},
"mcis.InspectResourceResult": {
"type": "object",
"properties": {
"connectionName": {
"type": "string"
},
"cspTotalOverview": {
"$ref": "#/definitions/mcis.inspectOverview"
},
"elapsedTime": {
"type": "integer"
},
"systemMessage": {
"type": "string"
},
"tumblebugOverview": {
"$ref": "#/definitions/mcis.inspectOverview"
}
}
},
"mcis.JSONResult": {
"type": "object"
},
Expand Down Expand Up @@ -7433,6 +7514,23 @@ const docTemplate = `{
}
}
},
"mcis.inspectOverview": {
"type": "object",
"properties": {
"securityGroup": {
"type": "integer"
},
"sshKey": {
"type": "integer"
},
"vNet": {
"type": "integer"
},
"vm": {
"type": "integer"
}
}
},
"mcis.registerationOverview": {
"type": "object",
"properties": {
Expand Down
98 changes: 98 additions & 0 deletions src/api/rest/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,41 @@
}
}
},
"/inspectResourcesOverview": {
"get": {
"description": "Inspect Resources Overview (vNet, securityGroup, sshKey, vm) registered in CB-Tumblebug and CSP for all connections",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"[Admin] System management"
],
"summary": "Inspect Resources Overview (vNet, securityGroup, sshKey, vm) registered in CB-Tumblebug and CSP for all connections",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/mcis.InspectResourceAllResult"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/common.SimpleMsg"
}
}
}
}
},
"/loadCommonResource": {
"get": {
"description": "Load Common Resources from internal asset files (Spec, Image)",
Expand Down Expand Up @@ -6392,6 +6427,52 @@
}
}
},
"mcis.InspectResourceAllResult": {
"type": "object",
"properties": {
"availableConnection": {
"type": "integer"
},
"cspTotalOverview": {
"$ref": "#/definitions/mcis.inspectOverview"
},
"elapsedTime": {
"type": "integer"
},
"inspectResult": {
"type": "array",
"items": {
"$ref": "#/definitions/mcis.InspectResourceResult"
}
},
"registeredConnection": {
"type": "integer"
},
"tumblebugOverview": {
"$ref": "#/definitions/mcis.inspectOverview"
}
}
},
"mcis.InspectResourceResult": {
"type": "object",
"properties": {
"connectionName": {
"type": "string"
},
"cspTotalOverview": {
"$ref": "#/definitions/mcis.inspectOverview"
},
"elapsedTime": {
"type": "integer"
},
"systemMessage": {
"type": "string"
},
"tumblebugOverview": {
"$ref": "#/definitions/mcis.inspectOverview"
}
}
},
"mcis.JSONResult": {
"type": "object"
},
Expand Down Expand Up @@ -7425,6 +7506,23 @@
}
}
},
"mcis.inspectOverview": {
"type": "object",
"properties": {
"securityGroup": {
"type": "integer"
},
"sshKey": {
"type": "integer"
},
"vNet": {
"type": "integer"
},
"vm": {
"type": "integer"
}
}
},
"mcis.registerationOverview": {
"type": "object",
"properties": {
Expand Down
66 changes: 66 additions & 0 deletions src/api/rest/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,36 @@ definitions:
systemMessage:
type: string
type: object
mcis.InspectResourceAllResult:
properties:
availableConnection:
type: integer
cspTotalOverview:
$ref: '#/definitions/mcis.inspectOverview'
elapsedTime:
type: integer
inspectResult:
items:
$ref: '#/definitions/mcis.InspectResourceResult'
type: array
registeredConnection:
type: integer
tumblebugOverview:
$ref: '#/definitions/mcis.inspectOverview'
type: object
mcis.InspectResourceResult:
properties:
connectionName:
type: string
cspTotalOverview:
$ref: '#/definitions/mcis.inspectOverview'
elapsedTime:
type: integer
systemMessage:
type: string
tumblebugOverview:
$ref: '#/definitions/mcis.inspectOverview'
type: object
mcis.JSONResult:
type: object
mcis.McisCmdReq:
Expand Down Expand Up @@ -1700,6 +1730,17 @@ definitions:
targetStatus:
type: string
type: object
mcis.inspectOverview:
properties:
securityGroup:
type: integer
sshKey:
type: integer
vNet:
type: integer
vm:
type: integer
type: object
mcis.registerationOverview:
properties:
failed:
Expand Down Expand Up @@ -2071,6 +2112,31 @@ paths:
CB-Spider, CSP
tags:
- '[Admin] System management'
/inspectResourcesOverview:
get:
consumes:
- application/json
description: Inspect Resources Overview (vNet, securityGroup, sshKey, vm) registered
in CB-Tumblebug and CSP for all connections
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/mcis.InspectResourceAllResult'
"404":
description: Not Found
schema:
$ref: '#/definitions/common.SimpleMsg'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/common.SimpleMsg'
summary: Inspect Resources Overview (vNet, securityGroup, sshKey, vm) registered
in CB-Tumblebug and CSP for all connections
tags:
- '[Admin] System management'
/loadCommonResource:
get:
consumes:
Expand Down

0 comments on commit 59dc654

Please sign in to comment.