-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
I assume OpenAPI Generator's own samples are valid. - Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
Generated code should compile [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Several Java-based generators have an option called fullJavaUtil. When this is set to true, OpenAPI Generator in many cases produces output code that can not be compiled.
I created an example commit here. It simply uses the examples that are part of the OpenAPI Generator repository, but with fullJavaUtil=true. As you can see in the pipeline status for the commit, many of the samples don't work with that setting.
Also, there's one special case: Using fullJavaUtil=true in the java-helidon-client-se sample generates errors already when running OpenAPI Generator, not only when compiling its output.
In a previous PR I had already prepared some fixes for the fullJavaUtil problems, but eventually I reverted them. See here.
There, I also brought up the idea of deprecating fullJavaUtil as it causes problems and apparently is not used much.
openapi-generator version
master
Generation Details
I enabled fullJavaUtil in the Java sample files and then ran ./bin/generate-samples.sh to create the demo commit which I linked above.
Suggest a fix
Either fix the various problems, possibly based on the mentioned work I did already. Or deprecate and eventually remove fullJavaUtil.
I would be willing to work on a PR for this. Just let me know how the described problems should be handled.