This is the JSON-response of a GET-Reqeust:
{
...
"_links": {
"self": {
"href": "http://localhost:8080/persons/1"
},
"person": {
"href": "http://localhost:8080/persons/1{?projection}",
"templated": true
},
"anotherResource": {
"href": "http://localhost:8080/persons/1/anotherResource"
}
}
}
The thing is, that I need to have the self-link of "anotherResource". Instead of:
"href": "http://localhost:8080/persons/1/anotherResource"
I need to have link something like:
"href": "http://localhost:8080/anotherResources/2"
I know that I can implement it by doing additional request. But this solution is not practical/possible in my situation, I need to have a lot of data and it's not good to perform an additional request for each item.
Any suggestions/solutions?