spring-projects / spring-projects/spring-hateoas
How to apply @JsonView on Link object; do not see any way to override getId in model
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 476
- PR merge metrics
- No merged PRs in 30d
Description
@olivergierke
The restController is returning one model which has @JsonView annotation and its not applied to links, which returns an empty list. how to resolve this problem ?
ResourceSupport has function getId() which returns links to self, most of the data mdoel has id and getId method, is there any way to resolve this except changing method name in model.
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
Start by reproducing the RestController response described in the issue, using a model with @JsonView and links supplied by ResourceSupport. Read ResourceSupport.getId() alongside the model's existing getId method to determine why the view produces an empty link list. Done means the reported link serialization and method-name conflict have a documented resolution without assuming an unstated file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100