I have my healthIndicators written for different databases which extend the AbstractHealthIndicator from spring.
But the end consumer expects the response in a different format in which the common keys and data expected are different.
Actual :
{
"status": "DOWN",
"details": {
"B": {
"status": "UP",
"details": {
"reachable": true
}
},
"A": {
"status": "DOWN",
"details": {
"reachable": false
}
}
}
}
Expected :
{
"result": true,
"data": {
"modules": [
{
"name": "A",
"status": "OK"
},
{
"name": "B",
"status": "DOWN"
},
]
}
}
Is it possible to write a converter, which can do this ?