I have this issue where I coded a controller and i returning a Response (endpoint consumes and produces json) as follows:
when i return something, controller is converting the whole response into json, i know is logical, but i have the same controller in another old project and as it is it works, i mean the controller returns the http status and only the json i'm returning
This is the code of one return
If
test the endpoint through postman, it returns a huge json and just one child of the json, the entity is what i need to return, so what am i doing wrong...
This is the old controller that is currently working fine (i know there are a whole different libraries like swagger and version that behaves different)