-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG][CLI][GENERATOR] NullPointer when not setting outputDir #3439
Comments
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
…builder. There are a few issues here: - outputDir's default was set to "." but was overwritten by the builder. - validateSpec was defaulted to true but was overwritten to false by the builder. - strictSpecBehavior was defaulted to true but was overwritten to false by the builder. A builder should not have primitive not nullable fields if there are fields containing default which are not nullable. The main issue I migrated the default value setter to the builder is that fields can be nullable but have set a notnull default. If null is an indicator whether to set the value or not those values could never be set to null.
Isn't What should be the default if omitted ? (I think a proper error indicating that the option is missing could also be ok) |
na, it is not required. The default is the current directory |
I just downloaded version 4.1.0 as a npm package and i got the same error. Using the cli command without
results in the following error
Whereas when specifying the output parameter directly it works without any error:
Setup: Windows 10, Powershell, CMD, git bash |
merged and working |
Bug Report Checklist
Description
The openapi-generator-cli will throw a NullPointerException when the flag
o
is omitted.openapi-generator version
master commit no. 2c4fdd0
OpenAPI declaration file content or url
Example Petstore is sufficient
Command line used for generation
Steps to reproduce
The above statement will throw following NullPointer:
This Nullpointer will vanish if you add the flag
o
to the command :Related issues/PRs
Found nothing
Suggest a fix
I am looking into it and will hopefully provide a pull request shortly.
The text was updated successfully, but these errors were encountered: