Skip to content

fix(custom generators): prioritize custom generator JAR when provided#1189

Merged
wing328 merged 1 commit intoOpenAPITools:masterfrom
smolnikov:custom-generator-priority
Apr 7, 2026
Merged

fix(custom generators): prioritize custom generator JAR when provided#1189
wing328 merged 1 commit intoOpenAPITools:masterfrom
smolnikov:custom-generator-priority

Conversation

@smolnikov
Copy link
Copy Markdown
Contributor

@smolnikov smolnikov commented Apr 7, 2026

  • 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.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

@wing328
Copy link
Copy Markdown
Member

wing328 commented Apr 7, 2026

looks good to me

thanks for the enhancement

@wing328 wing328 merged commit 4c6ff56 into OpenAPITools:master Apr 7, 2026
4 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

🎉 This PR is included in version 2.31.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants