Expand POJO in URL params to multiple object params
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.8k
- Forks
- 1.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 41
Description
Hi!
I think I might need some help here.
Lets say, I have this API contract GET /api/v1/game with url params - gameId, token, settings[language,currency]
In my case, I need the final URL to be like this: /api/v1/game?gameId=1&token=2&settings[language]=en&settings[currency]=USD
I have proper DTO with required fields including 'Settings' object. So for this scenario the temporary solution was using @Param("settings[language]") and so on, but then I should get rid of Settings field.
Is there a more proper way to expand an POJO field to multiple URL params in the style I mentioned before?
Contributor guide
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 locating Feign's handling of @Param values and DTO fields used for URL parameters. Verify how the Settings object is currently represented, then define whether the requested bracketed language and currency parameters can be generated while retaining the DTO field; done means the API contract produces the four shown query parameters without separate annotations for each nested value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100