Skip to content

Fix anyOf and oneOf v2 serialization - #978

Merged
Millicent Achieng (millicentachieng) merged 2 commits into
vnextfrom
ma/fix-anyOf-oneOf-v2-serialization
Aug 15, 2022
Merged

Millicent Achieng (millicentachieng) merged 2 commits into
vnextfrom
ma/fix-anyOf-oneOf-v2-serialization

Conversation

@millicentachieng

@millicentachieng Millicent Achieng (millicentachieng) commented Aug 15, 2022 •

Copy link
Copy Markdown
Contributor

Fixes #850

When converting a schema to Open API v2, which contains either oneOf or anyOf, we add them as allOf if an allOf doesn't already exist, since both are not supported in v2.

The existing implementation failed to check if anyOf or oneOf existed before attempting to add allOf. This PR adds the check.

@millicentachieng
Millicent Achieng (millicentachieng) deleted the ma/fix-anyOf-oneOf-v2-serialization branch August 15, 2022 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error on SerializeAsV2 when InlineLocalReferences = true

2 participants