[add]: Database health check

This commit is contained in:
VivianDee
2025-10-03 14:54:56 +01:00
parent f5cf4e5bdd
commit ab9330bb23
2 changed files with 56 additions and 1 deletions
+36
View File
@@ -83,6 +83,10 @@
"description": "Find out more",
"url": "https://www.simbrellang.net"
}
},
{
"name": "Health",
"description": "System health check including DB status."
}
],
"paths": {
@@ -106,6 +110,38 @@
},
"/Repayment": {
"$ref": "swagger/paths/Repayment.json"
},
"/health": {
"get": {
"tags": ["Health"],
"summary": "Health Check",
"description": "Returns service health information including DB connection status.",
"responses": {
"200": {
"description": "Health check successful",
"content": {
"application/json": {
"example": {
"status": "ok",
"db_status": "Connection Successful"
}
}
}
},
"500": {
"description": "Health check failed",
"content": {
"application/json": {
"example": {
"status": "ok",
"db_status": "Connection Failed",
"error": "could not connect to server: Connection refused"
}
}
}
}
}
}
}
},
"components": {