fix(custom generators): prioritize custom generator JAR when provided by smolnikov · Pull Request #1189 · OpenAPITools/openapi-generator-cli
- Skip Maven JAR download when
--custom-generatoris provided, allowing the CLI to run with only a custom JAR - When the standard JAR is already present, both JARs are still combined on the classpath (preserving existing behavior for custom generators that extend base classes)
- Detect
--custom-generatorfromprocess.argvearly in bootstrap, before Commander parses, so the flag is available duringinit()command discovery
Summary by cubic
Prioritize a user-provided custom generator JAR. If --custom-generator is passed, the CLI skips downloading the standard JAR and uses only the custom JAR when the standard one is missing; otherwise both are added to the classpath.
- Bug Fixes
- Skip version lookup and download when
--custom-generatoris present. - Use only the custom JAR if the standard JAR is absent; otherwise combine both on the classpath.
- Detect
--custom-generatorearly fromprocess.argv(supports--custom-generator <path>and--custom-generator=<path>).
- Skip version lookup and download when
Written for commit 70ceec1. Summary will update on new commits.