fix(custom generators): prioritize custom generator JAR when provided by smolnikov · Pull Request #1189 · OpenAPITools/openapi-generator-cli

  • Skip Maven JAR download when --custom-generator is 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-generator from process.argv early in bootstrap, before Commander parses, so the flag is available during init() 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-generator is present.
    • Use only the custom JAR if the standard JAR is absent; otherwise combine both on the classpath.
    • Detect --custom-generator early from process.argv (supports --custom-generator <path> and --custom-generator=<path>).

Written for commit 70ceec1. Summary will update on new commits.