-
-
Notifications
You must be signed in to change notification settings - Fork 7k
[REQ] Avoid warning in typescript client generator #20485
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
Comments
I stumbled upon the exact same problem. However I saw that there is #16187 which completely removes it. So I guess it makes no sense to file a PR for this, does it? |
I found the same line of code is the
Am I wrong? Despite this, It's only a minor change to avoid a warning: I wouldn't create a dedicated PR, we can wait for the next changes planned on that generator. |
I'm not sure if I understand you correctly. The PR I linked will remove that line (see 8636efe#diff-e07b04e9dd1e4acea6c1d994fd38512f06fa272ca70e4bca3e8d9126e74e5ca0), so after it was merged, it won't be in the Due to that, creating a PR for this issue would lead to Merge Conflicts in the other PR. However, the linked PR is stale for 1.5 years now and even it's just a warning, it should be treated properly as you proposed in your description. So feel free to create a PR for it. :D |
Sorry, I thought they had already merged the PR... @wing328 are you planning to merge that PR or is it still on hold? Thanks |
please see the update: #16187 (comment) please open a PR with your suggested fix for the warning message when you've time. |
Uh oh!
There was an error while loading. Please reload this page.
When I try to generate a typescript client setting only
--input-spec
and--output
parameters, openapi-generator-cli prompts a warning with the following message:[main] WARN o.o.codegen.DefaultCodegen - The value (generator's option) must be either boolean or string. Default to `false`.
Describe the solution you'd like
Check if the
supportsES6
additional property is present before trying to set it insideprocessOpts()
method ofAbstractTypeScriptClientCodegen
class:or
Describe alternatives you've considered
In order to make the warning disappear, I have to explicitly set
supportsES6
additional property:Additional context
The warning is produced by
convertPropertyToBooleanAndWriteBack
method insidesetSupportsES6
setter:openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java
Line 416 in 12dfe8f
The text was updated successfully, but these errors were encountered: