[BUG] docker version of openapi-generator-cli doesn't recognize `openapitools.json`
@kay-schecker 已经在做这个了。
开始于 2025年3月24日。
评估
这个 Issue 还没有评估数据。
描述
🐛 Bug Report:
docker version of openapi-generator-cli doesn't work with configuration files.
Steps to Reproduce
despite the documentation, following doesn't work:
openapitools.json:
{
"$schema": "https://raw.githubusercontent.com/OpenAPITools/openapi-generator-cli/refs/heads/master/apps/generator-cli/src/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "7.12.0",
"generators": {
"v3.0": {
"inputSpec": "https://touhoudb.com/swagger/v1/swagger.json",
"generatorName": "typescript-fetch",
"output": "#{cwd}/client"
}
}
}
}
podman run --rm -v $PWD:/local:z openapitools/openapi-generator-cli generate
[error] Required option '-i' is missing
even if i explicitly pass in config file, it doesn't read config file despite "generatorName": "typescript-fetch",
podman run --rm -v $PWD:/local:z openapitools/openapi-generator-cli generate --config /local/openapitools.json
Exception in thread "main" java.lang.NullPointerException: generator name must be specified
at java.base/java.util.Objects.requireNonNull(Unknown Source)
at org.apache.commons.lang3.Validate.notEmpty(Validate.java:388)
at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:643)
at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:744)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:527)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)
Expected behavior
docker version works the same like the npm version.
Screenshots
If applicable, add screenshots to help explain your problem.
Operation System (please complete the following information):
- OS: Fedora Linux
- Version 41
Package System (please complete the following information):
- Version rpm 4.20.0
Additional context
Add any other context about the problem here.
- 主要语言
- 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
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 1/5 1 小时以内 新手友好度 85/100
-
Mend: dependency security vulnerability untriaged
难度 2/5 1-3 小时 新手友好度 70/100