openapi-generator-jar is ignoring the --custom-generator= option and trying to download the openapi-generator jar instead
@kay-schecker đang làm issue này rồi.
Từ ngày 9/9/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Describe the bug
The --custom-generator=path-to-local-jar option is ignored and openapi-generator-cli tries to download the openapi-generator jar instead.
There was an older issue #439 which was marked fixed, but the problem is recurring again.
Steps to Reproduce
On Linux, I've installed
$ npm install -D @openapitools/openapi-generator-cli@2.13.4
$ npm ls @openapitools/openapi-generator-cli
└── @openapitools/openapi-generator-cli@2.13.4
but when I try --custom-generator=/workspace/openapi-generator/openapi-generator-6.6.0.jar , the cli tries to download the jar instead
The jar exists in the named location:
# ls -al /workspace/api-defs/bin/openapi-generator/openapi-generator-6.6.0.jar
-rw-r--r-- 1 user user 6134461 Aug 15 17:50 /workspace/api-defs/bin/openapi-generator/openapi-generator-6.6.0.jar
The full command I'm using with openapi-generator-cli is shown below
npx openapi-generator-cli generate --skip-validate-spec --generator-name typescript-angular --input-spec /workspace/openapi.yaml --custom-generator=/workspace/openapi-generator/openapi-generator-6.6.0.jar --template-dir /workspace/openapi-generator/templates/typescript-angular19 --type-mappings set=Array '--additional-properties=npmName=@abc/typescript-angular19-client-sdk,namespace=abc,npmVersion=1.50.0,npmRegistry=https://example.com.com/repository/npm-private/,ngVersion="19.0.0",rxjsVersion="7.4.0",ngPackagrVersion="19.0.0",zonejsVersion="0.15.0",snapshot="false"' --output /workspace//sdks/angular19-client-sdk
but instead of using /workspace/openapi-generator/openapi-generator-6.6.0.jar as requested, the CLI tries to download the jar:
Download 6.6.0 ...
which then seems to hang (which is why we've made a copy of the jar, so our Jenkins CI build does not time out downloading the jar -- we need deterministic builds and dependencies in CI builds)
Expected behavior
Use the named custom generator, not try to download the jar
Operation System (please complete the following information):
- OS: Linux
- Version inux d72252143456 6.10.14-linuxkit
Package System (please complete the following information):
- Version @openapitools/openapi-generator-cli@2.13.4
- node --version
v20.12.2 - npm --version
10.5.0
- Ngôn ngữ chính
- TypeScript
- Star
- 2k
- Fork
- 208
- Merge trung bình
- 7 giờ 12 phút
- Pull request đã merge (30 ngày)
- 6
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenAPITools/openapi-generator-cli
-
[FEATURE] consider using caret ranges instead of pinned exact versions for runtime dependencies Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
bug
OpenAPITools/openapi-generator-cli#1213 · 1 người được giao ·
-
bug
OpenAPITools/openapi-generator-cli#1190 · 1 người được giao ·
-
bug
OpenAPITools/openapi-generator-cli#1138 · 1 bình luận · 1 người được giao ·
-
bug
OpenAPITools/openapi-generator-cli#1094 · 1 bình luận · 1 người được giao ·
Tất cả issue của OpenAPITools/openapi-generator-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
TanStack/tanstack.com#1293 ·