OpenAPITools / OpenAPITools/openapi-generator
[REQ][Java] Use aggregate parameter objects as function arguments for api
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
We would need the possibility to use aggregate parameter objects as function arguments for API, similar to other generators, i.e. typescript.
We have a lot of APIs that have many optional parameters and when a new parameter is added then all the client calls need to be modified by adding the new parameter with a null value.
Describe the solution you'd like
The solution would be to specify a boolean config option, namely useObjectParameters, that, when set to true, the generated code would use aggregate parameter objects as function arguments for API operations instead of passing each parameter as a separate function argument.
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 comparing the Java generator's API operation argument generation with the TypeScript generator linked in the issue. Trace how generator options are declared and applied, then define how useObjectParameters should affect generated Java API signatures and calls. Done means the option is documented and its generated output is covered by the relevant generator tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100