spring-projects / spring-projects/spring-hateoas
Add support for @ModelAttribute
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 476
- PR merge metrics
- No merged PRs in 30d
Description
Controller method parameters annotated with MVC's @ModelAttribute currently do not get represented in HAL. Adding support for that Annotation (provided explictly or implicitly) would be appreciated. @gregturn suggested that QueryParameter, currently responsible for @RequestParam, could be modified to cover that Attribute as well.
Note that RFC6570 - aside from its form-style query expansion - also defines a composite value using an "explode" modifier ("*"). Support for @ModelAttribute could conveivably take either shape, or even offer that choice to the developer in some way.
| style | example |
|---|---|
| simple form style | {?field1,field2,field3,page,size,sort} |
| with composite value | {?myClass*,page,size,sort} |
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 reading QueryParameter, which currently handles @RequestParam, and compare its behavior with explicit and implicit @ModelAttribute parameters. Review the RFC6570 form-style and explode alternatives; done means an agreed representation for model attributes is supported in HAL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100