Skip to content

Instantly share code, notes, and snippets.

@odrotbohm
Last active September 4, 2018 08:59
Show Gist options
  • Save odrotbohm/bd204f35c98b5e2b8d5e to your computer and use it in GitHub Desktop.
Save odrotbohm/bd204f35c98b5e2b8d5e to your computer and use it in GitHub Desktop.
Improved projection links with Spring Data REST
{
"_embedded" : {
"orders" : [ {
"items" : [ {
"description" : "Lakewood guitar",
"price" : 1299.00
} ],
"_embedded" : {
"customer" : {
"address" : "4711 Some Place, 54321 Charlottesville, VA",
"firstname" : "Dave",
"lastname" : "Matthews",
"_links" : {
"self" : {
"href" : "http://localhost:8080/customers/1{?projection}",
"templated" : true
}
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/orders/1"
},
"customer" : {
"href" : "http://localhost:8080/orders/1/customer"
}
}
} ]
}
}
{
"items": [
{
"description": "Lakewood guitar",
"price": 1299
}
],
"_embedded": {
"customer": {
"address": "4711 Some Place, 54321 Charlottesville, VA",
"firstname": "Dave",
"lastname": "Matthews"
}
},
"_links": {
"self": {
"href": "http://localhost:8080/orders/1"
},
"customer": {
"href": "http://localhost:8080/orders/1/customer"
}
}
}
@aycanadal
Copy link

aycanadal commented Oct 25, 2016

What version of what exactly do we need to get this?

@savinov
Copy link

savinov commented Sep 4, 2018

I think, this is just an idea, which is not impemented yet.
Related issue: https://jira.spring.io/browse/DATAREST-682

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment