Skip to content
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 composed properties missing from allVars #3616

Merged
merged 2 commits into from
Aug 12, 2019

Conversation

glennschmidt
Copy link
Contributor

Description of the PR

Fixes #3613

When a model includes properties by composition (allOf, without a discriminator), these properties end up in the vars template variable but they are missing from the allVars variable.

@macjohnny
Copy link
Member

cc @OpenAPITools/generator-core-team

Copy link
Member

@macjohnny macjohnny left a comment

Choose a reason for hiding this comment

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

LGTM

@wing328
Copy link
Member

wing328 commented Aug 12, 2019

@glennschmidt thanks for the PR. Can you please update the test case in

final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/allOf_composition.yaml");
to test allVars of superman as well?

Copy link
Member

@wing328 wing328 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix and the unit tests.

@wing328 wing328 merged commit 36ccd87 into OpenAPITools:master Aug 12, 2019
@glennschmidt glennschmidt deleted the pr/missing-all-vars branch August 13, 2019 00:07
@wing328
Copy link
Member

wing328 commented Aug 26, 2019

@glennschmidt thanks for the PR, which has been included in the v4.1.1 release: https://twitter.com/oas_generator/status/1165944867391860737

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

Successfully merging this pull request may close these issues.

[BUG] Composed properties are missing from allVars
4 participants