example dto generated:
{
"id": 1,
"name": "test",
"attributes": null
}
expecting response:
{
"id": 1,
"name": "test"
}
here I have to ignore attributes while returning. I cannot use @JsonInclude(JsonInclude.Include.NON_NULL) in dto because it has to be auto generated for other reasons and I cannot give @NotNull in model because it can be null for some cases. Can someone please help me with this?