spring-projects / spring-projects/spring-hateoas
Support force Spring HATEOAS resources to render an empty embedded array in straightforward way
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 476
- PR merge metrics
- No merged PRs in 30d
Description
This has been requested before: http://stackoverflow.com/questions/30286795/how-to-force-spring-hateoas-resources-to-render-an-empty-embedded-array#comment69331410_30297552
For example, if the array is not rendered, REST clients will break. Handling this edge case by default will require additional coding in all REST clients.
How about extending the constructor?
new Resources<>(Exercise.class, exercises, ...);
is acceptable for me.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
The issue names the Resources constructor and the Spring HATEOAS representation behavior, but no files or tests. Start by locating Resources and checking how an empty embedded collection is rendered; add focused coverage for the proposed API behavior, with completion shown by REST output containing the empty embedded array.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100