fix(api): missing health field for route in docs and generated api code

This commit is contained in:
yusing
2025-08-17 14:33:53 +08:00
parent c19d82c876
commit e52c86e0b7
4 changed files with 254 additions and 7 deletions

View File

@@ -2033,6 +2033,70 @@ 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": {
@@ -2491,6 +2555,14 @@ const docTemplate = `{
"excluded": {
"type": "boolean"
},
"health": {
"description": "for swagger",
"allOf": [
{
"$ref": "#/definitions/HealthJSON"
}
]
},
"healthcheck": {
"$ref": "#/definitions/HealthCheckConfig"
},
@@ -3225,6 +3297,14 @@ const docTemplate = `{
"excluded": {
"type": "boolean"
},
"health": {
"description": "for swagger",
"allOf": [
{
"$ref": "#/definitions/HealthJSON"
}
]
},
"healthcheck": {
"$ref": "#/definitions/HealthCheckConfig"
},