I have two endPoints that returns this Json :
"type": {
"nbrCurrentRemainingDays": 0,
"desc": "put desc here !",
"id": 32
}
I need to make it ignore the desc for the first endPoint and let it for the second , is there any solution other than creating another ResponseDTO ?
@jsonIgnore will ignore the property for all endPoints.
For the first endPoint : no desc
"type": {
"nbrCurrentRemainingDays": 0,
"id": 32
}
For the second : with desc
"type": {
"nbrCurrentRemainingDays": 0,
"desc": "put desc here !",
"id": 32
}