Last active
September 4, 2018 08:59
-
-
Save odrotbohm/bd204f35c98b5e2b8d5e to your computer and use it in GitHub Desktop.
Improved projection links with Spring Data REST
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_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" | |
} | |
} | |
} ] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} | |
} |
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
What version of what exactly do we need to get this?