-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Fix imports and property name when using anyof/oneof in services #3639
Fix imports and property name when using anyof/oneof in services #3639
Conversation
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
|
||
if (codegenProperty != null && codegenProperty.getComplexType() != null && codegenProperty.getComplexType().contains(" | ")) { |
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.
will it always be surrounded by spaces, i.e. |
?
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.
Yes. But I must admit, the whole (any/one) of issue needs to be reconsidered as it's more of a hack rather than a sustainable fix. :|
@smasala thanks for your PR! |
@macjohnny don't think it fixes any of them |
@macjohnny don't think the travis fail is due to this commit |
@smasala I restarted CI |
@smasala somehow the travis build keeps failing. could you please merge the most recent master? |
…rator into smasala/anyof-oneof-fix-services
FYI @OpenAPITools/generator-core-team |
@smasala thanks for the PR, which has been included in the v4.1.1 release: https://twitter.com/oas_generator/status/1165944867391860737 |
PR checklist
master
,4.1.x
,5.0.x
. Default:master
.Description of the PR
Fixes request params when using anyOf / oneOf for api services where the param was gerenated as "UNKNOWN_BASE_TYPE" instead of (in TS)
Model1 | Model2
.Currently:
Fix:
@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) @topce (2018/10)