[add]: Summary to loan status response

This commit is contained in:
VivianDee
2025-10-23 08:52:28 +01:00
parent 63da7e8292
commit ad043ba3f8
7 changed files with 134 additions and 24 deletions
+6 -2
View File
@@ -103,7 +103,9 @@
"example": {
"status": "ok",
"db_status": "Connection Successful",
"events_service_status": "healthy",
"events_service_status":"Connection Successful",
"emulator_status":"Connection Successful",
"db_uri": "postgresql://user:****@localhost:5432/digifi_db",
"error": []
}
}
@@ -116,7 +118,9 @@
"example": {
"status": "failed",
"db_status": "Connection Failed",
"events_service_status": "unhealthy",
"events_service_status":"Connection Failed",
"emulator_status":"Connection Failed",
"db_uri": "Unavailable",
"error":["could not connect to server: Connection refused"]
}
}
@@ -102,6 +102,29 @@
"type": "number",
"format": "float",
"example": 30000.0
},
"summary": {
"type": "object",
"properties": {
"totalOutstandingAmount": {
"type": "number",
"format": "float",
"example": 114450.0,
"description": "Total amount still owed across all unpaid loans."
},
"totalActiveLoanAmount": {
"type": "number",
"format": "float",
"example": 40000.0,
"description": "Total principal amount of currently active loans."
},
"totalSettledAmount": {
"type": "number",
"format": "float",
"example": 80000.0,
"description": "Total amount that has been fully repaid."
}
}
}
},
"xml": {