spring-projects / spring-projects/spring-hateoas

Support force Spring HATEOAS resources to render an empty embedded array in straightforward way

Open
#522 13 comments 38 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

process: waiting for feedback unlikely
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.