When using Spring Data for my REST API, the answers currently received include the _links field:
{ "_embedded": { "users": [ { "imageUrl": "some_image_url", "name": "some name", "id": "57420b2a0d31bb6cef4ee8e9", "_links": { "self": { "href": "http://localhost:8080/users/57420b2a0d31bb6cef4ee8e9" }, "user": { "href": "http://localhost:8080/users/57420b2a0d31bb6cef4ee8e9{?projection}", "templated": true } } }, ...
Is there a way to create output so the _links field _links hidden? eg:.
{ "_embedded": { "users": [ { "imageUrl": "some_image_url", "name": "some name", "id": "57420b2a0d31bb6cef4ee8e9", }, ...
I find that since I am exposing the id field, _links not needed and basically just clutter up my answers.
source share