spring-projects / spring-projects/spring-data-rest
please support the ability to expand parts of a resource representation [DATAREST-243]
@odrotbohm is already working on this.
Since Dec 31, 2020.
- Dominant language
- Java
- Stars
- 958
- Forks
- 568
- PR merge metrics
- No merged PRs in 30d
Description
Josh Long opened DATAREST-243 and commented
It's often desirable to return inline the representation of some resource that has a relationship to the current resource.
So, for example, if i were to request an item resource for users (e.g. users/132), i might by default get a link to the association resource (e.g. the user's customers). For efficiency's sake, it can often be useful to inline the associations in the parent request. This is the REST equivalent of Hibernate's 1+N query problem for 1..N relationships.
Often, this may be implemented as simply as something like /users?expand=customers. Netflix, for example, does a form of this in their API.
In theory this could work the other way around, too: you might have an exclude request param that omits parts of the data
Issue Links:
- DATAREST-221 Support use case-driven inlining of managed resources
8 votes, 15 watchers
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.