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

[Workflow] Update Swagger REST API doc #1173

Merged
merged 1 commit into from
Sep 13, 2022
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
53 changes: 35 additions & 18 deletions src/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7112,7 +7112,8 @@ const docTemplate = `{
},
"interval": {
"description": "secs, Interval time between health checks.",
"type": "integer"
"type": "integer",
"example": 10
},
"keyValueList": {
"type": "array",
Expand All @@ -7122,19 +7123,23 @@ const docTemplate = `{
},
"port": {
"description": "Listener Port or 1-65535",
"type": "string"
"type": "string",
"example": "22"
},
"protocol": {
"description": "TCP|HTTP|HTTPS",
"type": "string"
"type": "string",
"example": "TCP"
},
"threshold": {
"description": "num, The number of continuous health checks to change the VM status.",
"type": "integer"
"type": "integer",
"example": 3
},
"timeout": {
"description": "secs, Waiting time to decide an unhealthy VM when no response.",
"type": "integer"
"type": "integer",
"example": 10
}
}
},
Expand Down Expand Up @@ -7170,13 +7175,15 @@ const docTemplate = `{
"description": "Optional, May be Used by Driver.",
"type": "string"
},
"dnsname": {
"dnsName": {
"description": "Optional, Auto Generated and attached",
"type": "string"
"type": "string",
"example": ""
},
"ip": {
"description": "Auto Generated and attached",
"type": "string"
"type": "string",
"example": ""
},
"keyValueList": {
"type": "array",
Expand All @@ -7186,11 +7193,13 @@ const docTemplate = `{
},
"port": {
"description": "1-65535",
"type": "string"
"type": "string",
"example": "22"
},
"protocol": {
"description": "TCP|UDP",
"type": "string"
"type": "string",
"example": "TCP"
}
}
},
Expand Down Expand Up @@ -7652,15 +7661,18 @@ const docTemplate = `{
}
},
"mcis": {
"type": "string"
"type": "string",
"example": "mc"
},
"port": {
"description": "Listener Port or 1-65535",
"type": "string"
"type": "string",
"example": "22"
},
"protocol": {
"description": "TCP|HTTP|HTTPS",
"type": "string"
"type": "string",
"example": "TCP"
},
"vms": {
"type": "array",
Expand Down Expand Up @@ -7903,7 +7915,8 @@ const docTemplate = `{
],
"properties": {
"connectionName": {
"type": "string"
"type": "string",
"example": "aws-ap-northeast-2"
},
"cspNLBId": {
"type": "string"
Expand All @@ -7918,26 +7931,30 @@ const docTemplate = `{
"$ref": "#/definitions/mcis.NLBListenerInfo"
},
"name": {
"type": "string"
"type": "string",
"example": "mc"
},
"scope": {
"description": "REGION(V) | GLOBAL",
"type": "string",
"enum": [
"REGION",
"GLOBAL"
]
],
"example": "REGION"
},
"type": {
"description": "PUBLIC(V) | INTERNAL",
"type": "string",
"enum": [
"PUBLIC",
"INTERNAL"
]
],
"example": "PUBLIC"
},
"vNetId": {
"type": "string"
"type": "string",
"example": "ns01-systemdefault-aws-ap-northeast-2"
},
"vmGroup": {
"$ref": "#/definitions/mcis.TBNLBVMGroup"
Expand Down
53 changes: 35 additions & 18 deletions src/api/rest/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -7104,7 +7104,8 @@
},
"interval": {
"description": "secs, Interval time between health checks.",
"type": "integer"
"type": "integer",
"example": 10
},
"keyValueList": {
"type": "array",
Expand All @@ -7114,19 +7115,23 @@
},
"port": {
"description": "Listener Port or 1-65535",
"type": "string"
"type": "string",
"example": "22"
},
"protocol": {
"description": "TCP|HTTP|HTTPS",
"type": "string"
"type": "string",
"example": "TCP"
},
"threshold": {
"description": "num, The number of continuous health checks to change the VM status.",
"type": "integer"
"type": "integer",
"example": 3
},
"timeout": {
"description": "secs, Waiting time to decide an unhealthy VM when no response.",
"type": "integer"
"type": "integer",
"example": 10
}
}
},
Expand Down Expand Up @@ -7162,13 +7167,15 @@
"description": "Optional, May be Used by Driver.",
"type": "string"
},
"dnsname": {
"dnsName": {
"description": "Optional, Auto Generated and attached",
"type": "string"
"type": "string",
"example": ""
},
"ip": {
"description": "Auto Generated and attached",
"type": "string"
"type": "string",
"example": ""
},
"keyValueList": {
"type": "array",
Expand All @@ -7178,11 +7185,13 @@
},
"port": {
"description": "1-65535",
"type": "string"
"type": "string",
"example": "22"
},
"protocol": {
"description": "TCP|UDP",
"type": "string"
"type": "string",
"example": "TCP"
}
}
},
Expand Down Expand Up @@ -7644,15 +7653,18 @@
}
},
"mcis": {
"type": "string"
"type": "string",
"example": "mc"
},
"port": {
"description": "Listener Port or 1-65535",
"type": "string"
"type": "string",
"example": "22"
},
"protocol": {
"description": "TCP|HTTP|HTTPS",
"type": "string"
"type": "string",
"example": "TCP"
},
"vms": {
"type": "array",
Expand Down Expand Up @@ -7895,7 +7907,8 @@
],
"properties": {
"connectionName": {
"type": "string"
"type": "string",
"example": "aws-ap-northeast-2"
},
"cspNLBId": {
"type": "string"
Expand All @@ -7910,26 +7923,30 @@
"$ref": "#/definitions/mcis.NLBListenerInfo"
},
"name": {
"type": "string"
"type": "string",
"example": "mc"
},
"scope": {
"description": "REGION(V) | GLOBAL",
"type": "string",
"enum": [
"REGION",
"GLOBAL"
]
],
"example": "REGION"
},
"type": {
"description": "PUBLIC(V) | INTERNAL",
"type": "string",
"enum": [
"PUBLIC",
"INTERNAL"
]
],
"example": "PUBLIC"
},
"vNetId": {
"type": "string"
"type": "string",
"example": "ns01-systemdefault-aws-ap-northeast-2"
},
"vmGroup": {
"$ref": "#/definitions/mcis.TBNLBVMGroup"
Expand Down
19 changes: 18 additions & 1 deletion src/api/rest/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1098,23 +1098,28 @@ definitions:
type: string
interval:
description: secs, Interval time between health checks.
example: 10
type: integer
keyValueList:
items:
$ref: '#/definitions/common.KeyValue'
type: array
port:
description: Listener Port or 1-65535
example: "22"
type: string
protocol:
description: TCP|HTTP|HTTPS
example: TCP
type: string
threshold:
description: num, The number of continuous health checks to change the VM
status.
example: 3
type: integer
timeout:
description: secs, Waiting time to decide an unhealthy VM when no response.
example: 10
type: integer
type: object
mcis.NLBHealthCheckerReq:
Expand All @@ -1141,21 +1146,25 @@ definitions:
cspID:
description: Optional, May be Used by Driver.
type: string
dnsname:
dnsName:
description: Optional, Auto Generated and attached
example: ""
type: string
ip:
description: Auto Generated and attached
example: ""
type: string
keyValueList:
items:
$ref: '#/definitions/common.KeyValue'
type: array
port:
description: 1-65535
example: "22"
type: string
protocol:
description: TCP|UDP
example: TCP
type: string
type: object
mcis.NetworkReq:
Expand Down Expand Up @@ -1474,12 +1483,15 @@ definitions:
$ref: '#/definitions/common.KeyValue'
type: array
mcis:
example: mc
type: string
port:
description: Listener Port or 1-65535
example: "22"
type: string
protocol:
description: TCP|HTTP|HTTPS
example: TCP
type: string
vms:
items:
Expand Down Expand Up @@ -1658,6 +1670,7 @@ definitions:
mcis.TbNLBReq:
properties:
connectionName:
example: aws-ap-northeast-2
type: string
cspNLBId:
type: string
Expand All @@ -1668,20 +1681,24 @@ definitions:
listener:
$ref: '#/definitions/mcis.NLBListenerInfo'
name:
example: mc
type: string
scope:
description: REGION(V) | GLOBAL
enum:
- REGION
- GLOBAL
example: REGION
type: string
type:
description: PUBLIC(V) | INTERNAL
enum:
- PUBLIC
- INTERNAL
example: PUBLIC
type: string
vNetId:
example: ns01-systemdefault-aws-ap-northeast-2
type: string
vmGroup:
$ref: '#/definitions/mcis.TBNLBVMGroup'
Expand Down