[BUG] Inconsistent openapitools.json handling beetwen npm and docker version of openapi-generator-cli
@kay-schecker 已经在做这个了。
开始于 2022年9月16日。
评估
这个 Issue 还没有评估数据。
描述
🐛 Bug Report:
Describe the bug
I want to configure generation in CLI in some kind of config file. When using (npm) generator-cli readme says that you can configure it with openapitools.json file and later use openapi-generator-cli generate --generator-key YOUR_GENERATOR_KEY but on the other hand if you want to use (docker) generator-cli this kind of configuration is unexpected.
Steps to Reproduce
Given such a config (config/config.json) file:
{
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "6.1.0",
"generators": {
"v3.0": {
"generatorName": "spring",
"output": "/local",
"inputSpec": "https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml",
"globalProperty": {
"models": "Order,User",
},
"additionalProperties": {
"apiPackage": "com.test",
"modelPackage": "com.test.model",
"supportingFilesToGenerate": "ApiUtil.java",
"groupId": "com.test",
"artifactId": "test",
"artifactVersion": "0.0.0",
"interfaceOnly": true
}
}
}
}
}
Command:
docker run --rm -v "${PWD}/tmp:/local" -v "${PWD}/config/config.json:/openapitools.json" openapitools/openapi-generator-cli:v6.1.0 generate --generator-key v3.0
Produces:
[error] Found unexpected parameters: [--generator-key, v3.0]
See 'openapi-generator-cli help' for usage.
Expected behavior
Consistent behavior for both npm generator-cli and docker generator-cli.
Operation System:
- OS: Windows
- Version 10
Package System:
No package system, just docker:
- Docker version 20.10.17, build 100c701
Additional context
IMO it should be well documented (and consistent) how to configure all of configuration properties (global and additional) by CLI using some kind of config file for both npm and docker CLI as it is helpful in CI/CD tools.
- 主要语言
- TypeScript
- 星标
- 2k
- 派生
- 208
- 平均合并
- 7 小时 12 分钟
- 30 天内合并 PR
- 6
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenAPITools/openapi-generator-cli 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
bug
OpenAPITools/openapi-generator-cli#1213 · 已指派 1 人 ·
-
bug
OpenAPITools/openapi-generator-cli#1190 · 已指派 1 人 ·
-
bug
OpenAPITools/openapi-generator-cli#1138 · 1 条评论 · 已指派 1 人 ·
-
bug
OpenAPITools/openapi-generator-cli#1094 · 1 条评论 · 已指派 1 人 ·
查看 OpenAPITools/openapi-generator-cli 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
-
security
难度 2/5 1-3 小时 新手友好度 72/100
IBM/node-sdk-core#373 ·
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 86/100
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
-
chore
难度 2/5 1-3 小时 新手友好度 88/100