OpenAPITools / OpenAPITools/openapi-generator

[REQ] Java generator should support USE_SINGLE_REQUEST_PARAMETER

Open
#8,843 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
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.

I would like to use builder pattern style for requests in Java. Currently the only way to do this is to change my OpenAPI spec and add x-group-parameters (which, BTW, doesn't seem to be documented anywhere). It seems that other generators have a USE_SINGLE_REQUEST_PARAMETER flag that enables this. There's no reason that an API spec should dictate the internal behavior of clients when it has no visible effects to the server. (Maybe I'm just missing something else that x-group-parameters changes about what the server can handle?)

Describe the solution you'd like

A setting for USE_SINGLE_REQUEST_PARAMETER (with appropriate documentation).

Describe alternatives you've considered

Modifying my spec file.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Java generator's handling of x-group-parameters and compare it with other generators that support USE_SINGLE_REQUEST_PARAMETER. Add the Java setting with appropriate documentation, then verify generated request APIs for both configuration modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
api, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.