feat : 修改 swagger-ui 的路径

This commit is contained in:
wangzhengkun
2022-06-14 14:46:36 +08:00
parent 86136d7c54
commit e9269e706d
6 changed files with 434 additions and 160 deletions

View File

@@ -49,7 +49,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/cluster.Cluster"
"$ref": "#/definitions/github.com_KubeOperator_kubepi_internal_model_v1_cluster.Cluster"
}
}
}
@@ -79,7 +79,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cluster.Cluster"
"$ref": "#/definitions/internal_api_v1_cluster.Cluster"
}
}
],
@@ -87,7 +87,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/cluster.Cluster"
"$ref": "#/definitions/internal_api_v1_cluster.Cluster"
}
}
}
@@ -652,7 +652,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/cluster.Cluster"
"$ref": "#/definitions/github.com_KubeOperator_kubepi_internal_model_v1_cluster.Cluster"
}
}
}
@@ -731,7 +731,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/cluster.Cluster"
"$ref": "#/definitions/github.com_KubeOperator_kubepi_internal_model_v1_cluster.Cluster"
}
}
}
@@ -1484,59 +1484,6 @@ const docTemplate = `{
}
}
},
"cluster.Cluster": {
"type": "object",
"properties": {
"apiVersion": {
"type": "string"
},
"builtIn": {
"type": "boolean"
},
"caCertificate": {
"$ref": "#/definitions/cluster.Certificate"
},
"createAt": {
"type": "string"
},
"createdBy": {
"type": "string"
},
"description": {
"type": "string"
},
"kind": {
"type": "string"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"privateKey": {
"type": "array",
"items": {
"type": "integer"
}
},
"spec": {
"$ref": "#/definitions/cluster.Spec"
},
"status": {
"$ref": "#/definitions/cluster.Status"
},
"updateAt": {
"type": "string"
},
"uuid": {
"type": "string"
}
}
},
"cluster.Connect": {
"type": "object",
"properties": {
@@ -1562,6 +1509,35 @@ const docTemplate = `{
}
}
},
"cluster.ExtraClusterInfo": {
"type": "object",
"properties": {
"cpuAllocatable": {
"type": "number"
},
"cpuRequested": {
"type": "number"
},
"health": {
"type": "boolean"
},
"memoryAllocatable": {
"type": "number"
},
"memoryRequested": {
"type": "number"
},
"message": {
"type": "string"
},
"readyNodeNum": {
"type": "integer"
},
"totalNodeNum": {
"type": "integer"
}
}
},
"cluster.Forward": {
"type": "object",
"properties": {
@@ -1749,6 +1725,59 @@ const docTemplate = `{
}
}
},
"github.com_KubeOperator_kubepi_internal_model_v1_cluster.Cluster": {
"type": "object",
"properties": {
"apiVersion": {
"type": "string"
},
"builtIn": {
"type": "boolean"
},
"caCertificate": {
"$ref": "#/definitions/cluster.Certificate"
},
"createAt": {
"type": "string"
},
"createdBy": {
"type": "string"
},
"description": {
"type": "string"
},
"kind": {
"type": "string"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"privateKey": {
"type": "array",
"items": {
"type": "integer"
}
},
"spec": {
"$ref": "#/definitions/cluster.Spec"
},
"status": {
"$ref": "#/definitions/cluster.Status"
},
"updateAt": {
"type": "string"
},
"uuid": {
"type": "string"
}
}
},
"imagerepo.Credential": {
"type": "object",
"properties": {
@@ -1902,6 +1931,80 @@ const docTemplate = `{
}
}
},
"internal_api_v1_cluster.Cluster": {
"type": "object",
"properties": {
"accessable": {
"type": "boolean"
},
"apiVersion": {
"type": "string"
},
"builtIn": {
"type": "boolean"
},
"caCertificate": {
"$ref": "#/definitions/cluster.Certificate"
},
"caDataStr": {
"type": "string"
},
"certDataStr": {
"type": "string"
},
"configContentStr": {
"type": "string"
},
"createAt": {
"type": "string"
},
"createdBy": {
"type": "string"
},
"description": {
"type": "string"
},
"extraClusterInfo": {
"$ref": "#/definitions/cluster.ExtraClusterInfo"
},
"keyDataStr": {
"type": "string"
},
"kind": {
"type": "string"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"memberCount": {
"type": "integer"
},
"name": {
"type": "string"
},
"privateKey": {
"type": "array",
"items": {
"type": "integer"
}
},
"spec": {
"$ref": "#/definitions/cluster.Spec"
},
"status": {
"$ref": "#/definitions/cluster.Status"
},
"updateAt": {
"type": "string"
},
"uuid": {
"type": "string"
}
}
},
"role.PolicyRule": {
"type": "object",
"properties": {