-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for controlling output of OpenAPI Generator version in generated files #17952
Conversation
@l3ender thanks for the PR. Please kindly put the work on hold for the time being as it's changing 1000+ files. Can you please PM me to discuss this further vis Slack tomorrow (Tue) or Wed? https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g My timezone is +0800 (Hong Kong) |
Recapping the offline discussion with @wing328, the version will not be added behind an option. If users want to control the output differently, they can customize/override the default templates. |
thanks for the PR, which has been merged. I'll file another PR to make some minor improvements. have a nice weekend |
update: removed generator name option sample and config via f61b7c2 |
Thanks for all the help with this, @wing328! If you find in the future the desire to revisit the approach of controlling generator version output with an option, please let me know! If it's not a big deal to have to regenerate all samples for each version upgrade, then no worries. Thanks again! |
Pity you didn't add the property/flag ( |
Overview
This PR implements the feature request described in #17681. It adds a global property/flag (
hideGeneratorVersion
) which is used to control whether the OpenAPI Generator version is outputted into generated files.The default value for the new property is
true
, meaning the generator version detail will not be added to generated files. This seemed like the least impacting way to do make the change.Therefore, the PR:
Resolves #17681.
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master
(upcoming 7.1.0 minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)