OpenAPITools / OpenAPITools/openapi-generator

Not sure I understand the generateConstructorWithAllArgs property

Open
#21,856 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

When running: openapi-generator generate -i spec.json -g java -o generated --additional-properties=generateConstructorWithAllArgs=true this doesnt add constructors with all arguments to my models, only an empty one. Removing the option does not change the diff, I also tried this with generateBuilders=true which also didn't change the diff. What am I missing?

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 reproducing the reported openapi-generator generate command with spec.json, the java generator, and the generateConstructorWithAllArgs and generateBuilders properties. Inspect the generated model output and determine whether the options change it; done means the behavior is reproduced and either clarified or covered by an appropriate project change.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.