docs(api): update swagger docs

This commit is contained in:
yusing
2025-08-17 01:50:38 +08:00
parent ba9cb083cf
commit d2f317b44d
3 changed files with 58 additions and 266 deletions

View File

@@ -850,9 +850,7 @@ const docTemplate = `{
},
"417": {
"description": "Validation failed",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
"schema": {}
},
"500": {
"description": "Internal server error",
@@ -1807,9 +1805,17 @@ const docTemplate = `{
"is_host_network_mode": {
"type": "boolean"
},
"labels": {
"description": "for displaying in UI",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"mounts": {
"type": "array",
"items": {
"description": "source:destination",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
@@ -1852,8 +1858,14 @@ const docTemplate = `{
"name": {
"type": "string"
},
"sha256": {
"type": "string"
},
"tag": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
@@ -2021,70 +2033,6 @@ const docTemplate = `{
}
}
},
"HealthExtra": {
"type": "object",
"properties": {
"config": {
"$ref": "#/definitions/LoadBalancerConfig"
},
"pool": {
"type": "object",
"additionalProperties": {}
}
}
},
"HealthJSON": {
"type": "object",
"properties": {
"config": {
"$ref": "#/definitions/HealthCheckConfig"
},
"detail": {
"type": "string"
},
"extra": {
"allOf": [
{
"$ref": "#/definitions/HealthExtra"
}
],
"x-nullable": true
},
"lastSeen": {
"type": "integer"
},
"lastSeenStr": {
"type": "string"
},
"latency": {
"type": "number"
},
"latencyStr": {
"type": "string"
},
"name": {
"type": "string"
},
"started": {
"type": "integer"
},
"startedStr": {
"type": "string"
},
"status": {
"type": "string"
},
"uptime": {
"type": "number"
},
"uptimeStr": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"HealthMap": {
"type": "object",
"additionalProperties": {
@@ -2543,14 +2491,6 @@ const docTemplate = `{
"excluded": {
"type": "boolean"
},
"health": {
"description": "for swagger",
"allOf": [
{
"$ref": "#/definitions/HealthJSON"
}
]
},
"healthcheck": {
"$ref": "#/definitions/HealthCheckConfig"
},
@@ -3285,14 +3225,6 @@ const docTemplate = `{
"excluded": {
"type": "boolean"
},
"health": {
"description": "for swagger",
"allOf": [
{
"$ref": "#/definitions/HealthJSON"
}
]
},
"healthcheck": {
"$ref": "#/definitions/HealthCheckConfig"
},