-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[BUGFIX][dart-dio] Align enum and enum_inline generation result
#19510
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
[BUGFIX][dart-dio] Align enum and enum_inline generation result
#19510
Conversation
|
@jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) @ahmednfwela (2021/08) Also @wing328 could you pay a little bit of attention. |
| {{#enumVars}} | ||
| @JsonValue({{#isString}}r{{/isString}}{{{value}}}) | ||
| {{{name}}}, | ||
| {{^isNull}} |
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.
Is isNull check necessary ?
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.
OpenApiSchema specifies a nullable enum to be defined including null as one of the possible values. https://swagger.io/docs/specification/data-models/enums/
We do not want thins null to be present among other items
This is why i'm filtering it out
92057be to
9d0b263
Compare
This reverts commit 9d0b263.
ahmednfwela
left a comment
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.
LGTM @wing328
|
Hi @wing328 |
|
@4brunu could you help with merging the PR? |
|
@vasilich6107 thanks for the PR, which has been merged. |
Align
enumandenum_inlinegeneration resultPreviously the PR(#15387) updated
enumgeneration but forgot to change theenum_inlinetemplatePR 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.6.0 minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)