Skip to content

Commit

Permalink
[Workflow] Update Swagger REST API doc
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-github-robot authored Dec 13, 2023
2 parents b54cebe + 810fbe2 commit 2cbde72
Show file tree
Hide file tree
Showing 3 changed files with 440 additions and 35 deletions.
178 changes: 165 additions & 13 deletions pkg/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1517,19 +1517,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"compute": {
"type": "string"
},
"disk": {
"type": "string"
},
"network": {
"type": "string"
},
"securityGroup": {
"type": "string"
},
"virtualMachine": {
"type": "string"
"$ref": "#/definitions/infra.Compute"
}
}
},
Expand Down Expand Up @@ -1581,6 +1569,170 @@ const docTemplate = `{
}
}
},
"infra.CPU": {
"type": "object",
"properties": {
"cache": {
"description": "KB",
"type": "integer"
},
"cores": {
"description": "ea",
"type": "integer"
},
"cpus": {
"description": "ea",
"type": "integer"
},
"model": {
"type": "string"
},
"speed": {
"description": "MHz",
"type": "integer"
},
"threads": {
"description": "ea",
"type": "integer"
},
"vendor": {
"type": "string"
}
}
},
"infra.Compute": {
"type": "object",
"properties": {
"compute_resource": {
"$ref": "#/definitions/infra.ComputeResource"
},
"os": {
"$ref": "#/definitions/infra.System"
}
}
},
"infra.ComputeResource": {
"type": "object",
"properties": {
"cpu": {
"$ref": "#/definitions/infra.CPU"
},
"memory": {
"$ref": "#/definitions/infra.Memory"
},
"storage": {
"type": "array",
"items": {
"$ref": "#/definitions/infra.Storage"
}
}
}
},
"infra.Kernel": {
"type": "object",
"properties": {
"architecture": {
"type": "string"
},
"release": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"infra.Memory": {
"type": "object",
"properties": {
"size": {
"description": "MB",
"type": "integer"
},
"speed": {
"description": "MHz",
"type": "integer"
},
"type": {
"type": "string"
}
}
},
"infra.Node": {
"type": "object",
"properties": {
"hostname": {
"type": "string"
},
"hypervisor": {
"type": "string"
},
"machineid": {
"type": "string"
},
"timezone": {
"type": "string"
}
}
},
"infra.OS": {
"type": "object",
"properties": {
"architecture": {
"type": "string"
},
"name": {
"type": "string"
},
"release": {
"type": "string"
},
"vendor": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"infra.Storage": {
"type": "object",
"properties": {
"driver": {
"type": "string"
},
"model": {
"type": "string"
},
"name": {
"type": "string"
},
"serial": {
"type": "string"
},
"size": {
"description": "GB",
"type": "integer"
},
"vendor": {
"type": "string"
}
}
},
"infra.System": {
"type": "object",
"properties": {
"kernel": {
"$ref": "#/definitions/infra.Kernel"
},
"node": {
"$ref": "#/definitions/infra.Node"
},
"os": {
"$ref": "#/definitions/infra.OS"
}
}
},
"model.MyUser": {
"type": "object",
"properties": {
Expand Down
178 changes: 165 additions & 13 deletions pkg/api/rest/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1510,19 +1510,7 @@
"type": "object",
"properties": {
"compute": {
"type": "string"
},
"disk": {
"type": "string"
},
"network": {
"type": "string"
},
"securityGroup": {
"type": "string"
},
"virtualMachine": {
"type": "string"
"$ref": "#/definitions/infra.Compute"
}
}
},
Expand Down Expand Up @@ -1574,6 +1562,170 @@
}
}
},
"infra.CPU": {
"type": "object",
"properties": {
"cache": {
"description": "KB",
"type": "integer"
},
"cores": {
"description": "ea",
"type": "integer"
},
"cpus": {
"description": "ea",
"type": "integer"
},
"model": {
"type": "string"
},
"speed": {
"description": "MHz",
"type": "integer"
},
"threads": {
"description": "ea",
"type": "integer"
},
"vendor": {
"type": "string"
}
}
},
"infra.Compute": {
"type": "object",
"properties": {
"compute_resource": {
"$ref": "#/definitions/infra.ComputeResource"
},
"os": {
"$ref": "#/definitions/infra.System"
}
}
},
"infra.ComputeResource": {
"type": "object",
"properties": {
"cpu": {
"$ref": "#/definitions/infra.CPU"
},
"memory": {
"$ref": "#/definitions/infra.Memory"
},
"storage": {
"type": "array",
"items": {
"$ref": "#/definitions/infra.Storage"
}
}
}
},
"infra.Kernel": {
"type": "object",
"properties": {
"architecture": {
"type": "string"
},
"release": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"infra.Memory": {
"type": "object",
"properties": {
"size": {
"description": "MB",
"type": "integer"
},
"speed": {
"description": "MHz",
"type": "integer"
},
"type": {
"type": "string"
}
}
},
"infra.Node": {
"type": "object",
"properties": {
"hostname": {
"type": "string"
},
"hypervisor": {
"type": "string"
},
"machineid": {
"type": "string"
},
"timezone": {
"type": "string"
}
}
},
"infra.OS": {
"type": "object",
"properties": {
"architecture": {
"type": "string"
},
"name": {
"type": "string"
},
"release": {
"type": "string"
},
"vendor": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"infra.Storage": {
"type": "object",
"properties": {
"driver": {
"type": "string"
},
"model": {
"type": "string"
},
"name": {
"type": "string"
},
"serial": {
"type": "string"
},
"size": {
"description": "GB",
"type": "integer"
},
"vendor": {
"type": "string"
}
}
},
"infra.System": {
"type": "object",
"properties": {
"kernel": {
"$ref": "#/definitions/infra.Kernel"
},
"node": {
"$ref": "#/definitions/infra.Node"
},
"os": {
"$ref": "#/definitions/infra.OS"
}
}
},
"model.MyUser": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit 2cbde72

Please sign in to comment.