So let's assume I have two applications, the Person application that manages people, and the Pants application that manages Pants. In the Person application the Domain object Person has a List pantsId that refers to the id of a pair of pants from the Pants application.
I'm not sure how to model this using Spring Data Rest so that when I serialize the person, I am able to embed a link to the external Pants application's pants instances. [or even to have /person/123/pants return a list of those external pants resources]
Looking for something along the lines of the below:
GET http://www.mydomain.com/personapp/person/123:
{
"name" : "bob",
"age": "30",
"_links" : {
"self" : {
"href" : "http://www.mydomain.com/personapp/person/123"
},
"pants" : {
"href" : "http://www.mydomain.com/pantsapp/pants/456"
"href" : "http://www.mydomain.com/pantsapp/pants/789"
}
}