spring-projects / spring-projects/spring-hateoas
Ordering of properties within a HAL forms template
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 476
- PR merge metrics
- No merged PRs in 30d
Description
I am playing around with the new HAL forms functionality and I have a question. It appears that properties within the affordance templates are being sorted alphabetically losing the order specified on the POJO. I presume this will be by design.
My goal is to create a client which renders dynamic forms based on the response from the API but I would want to be able to control ordering from the server. A simple workaround I can see is a prefix on the name of the field (i.e. field1_firstName, field2_lastName, field3_email).
Is there a recommended approach for doing this? Is it possible to retain the order of the properties as defined in the POJO?
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 HAL forms and affordance templates but no files, tests, or entry points. Start by locating the code that generates template properties and any ordering-related tests; done means the supported ordering behavior and recommended approach are clearly established.
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