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
[dart][core] Fix reservedWordsMappings #12436
[dart][core] Fix reservedWordsMappings #12436
Conversation
* `GeneratorSettings` used a wrong name (missing `s`) which resulted in config loaded from YAMl files not working
@@ -52,7 +52,7 @@ public final class GeneratorSettings implements Serializable { | |||
private final Map<String, String> importMappings; | |||
private final Map<String, String> inlineSchemaNameMappings; | |||
private final Set<String> languageSpecificPrimitives; | |||
private final Map<String, String> reservedWordMappings; | |||
private final Map<String, String> reservedWordsMappings; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a feeling this might break other PRs that are in progress and use this variable or getter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well that needs to be solved in whatever PR is merged last :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a change in public API of openapi-generator. this will also break external forks of openapi generators that a lot of companies manage on their own, it's not really dart related
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. According to the Docs, this is what it should be named like and what the CLI arg is named like.
This just brings the parser for YAML config in line.
See https://openapi-generator.tech/docs/usage/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imho this is a bug and not matching the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about updating the doc instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wing328 The [--reserved-words-mappings <reserved word mappings>...]
works correct for CLI args, just not for YAML-file configuration because of the typo. There is no separate documentation for the config file, so I think it should be fixed to match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. let's go with this fix. Thanks for the PR as always
GeneratorSettings
used a wrong name (missings
) which resulted in config loaded from YAMl files not workingPR checklist
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*
.For Windows users, please run the script in Git BASH.
CC @jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) @ahmednfwela (2021/08) - please give your opinion on the linked issue