[BUG] setting cli arguments causes config file to be ignored
@kay-schecker がすでに取り組んでいます。
2021年6月2日 から。
評価
この issue はまだ評価されていません。
説明
⚠️ Important Notice
Please differentiate the bug
This repository is not responsible for the actual code generation. If you have problems with the code generation, please open the bug at OpenAPITools/openapi-generator.
Please also check if the bug is already known before you open a new bug.
🐛 Bug Report:
Describe the bug
you cant seem to mix a config file with some of the cli options.
In this case I'm trying to set --server-variables=major=2 as the version is determined via script
Steps to Reproduce
Steps to reproduce the behavior:
Config File:
{
"$schema": "../../node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "5.1.1",
"generators": {
"server": {
"generatorName": "aspnetcore",
"output": "#{cwd}/../.generated",
"glob": "src/*.{json,yaml,yml}",
"modelNameSuffix": "",
"apiNameSuffix": "Base",
"additionalProperties": {
"aspnetCoreVersion": "5.0",
"classModifier": "abstract",
"buildTarget": "library",
"isLibrary": true,
"packageName": "OpenApi.Generated",
"operationIsAsync": true,
"operationResultTask": true,
"operationModifier": "abstract",
"swashbuckleVersion": "5.0.0"
}
}
}
}
}
running openapi-generator-cli generate woks as expected
running openapi-generator-cli generate --server-variables=major=2 errors with:
[error] Required option '-i' is missing
running openapi-generator-cli generate --server-variables=major=2 --config=openapitools.json errors with:
Exception in thread "main" java.lang.NullPointerException: generator name must be specified
at org.apache.commons.lang3.Validate.notEmpty(Validate.java:395)
at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:482)
at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:573)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:433)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)
Expected behavior
The cli should use the settings in the config file, with any cli arguments added/overriding the values in the file
Operation System (please complete the following information):
- OS: Ubuntu
- Version 20
Package System (please complete the following information):
- npm 6.14.13
- 主要言語
- TypeScript
- スター
- 2k
- フォーク
- 209
- 平均マージ
- 9時間 35分
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenAPITools/openapi-generator-cli のほかの issue
-
[FEATURE] consider using caret ranges instead of pinned exact versions for runtime dependenciesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
[BUG] JAVA_OPTS is incorrectly evaluated再び着手できるかも @kay-schecker が 122 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
OpenAPITools/openapi-generator-cli#1213 · 担当者 1 名 ·
-
[BUG] Proxy configuration of NPM not used when downloading .jar via version manager再び着手できるかも @kay-schecker が 177 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
OpenAPITools/openapi-generator-cli#1190 · 担当者 1 名 ·
-
[BUG] openapiGeneratorIgnoreList is missing from schema再び着手できるかも @kay-schecker が 227 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
OpenAPITools/openapi-generator-cli#1138 · コメント 1 件 · 担当者 1 名 ·
-
[BUG] Environment variable not found (missing .env loading)再び着手できるかも @kay-schecker が 266 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
OpenAPITools/openapi-generator-cli#1094 · コメント 1 件 · 担当者 1 名 ·
OpenAPITools/openapi-generator-cli の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
betagouv/mon-entreprise#4699 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
jaegertracing/jaeger-ui#4547 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
linagora/twake-calendar-frontend#1467 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
need4deed-org/sdk#267 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
auth0/universal-login#414 ·
メンテナーはふだん 1 日以内に返信