Skip to content

Conversation

@millicentachieng
Copy link
Contributor

@millicentachieng millicentachieng commented Aug 15, 2022

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 millicentachieng changed the title Ma/fix any of one of v2 serialization Fix anyOf and oneOf v2 serialization Aug 15, 2022
@millicentachieng millicentachieng linked an issue Aug 15, 2022 that may be closed by this pull request
@millicentachieng millicentachieng marked this pull request as ready for review August 15, 2022 20:03
@millicentachieng millicentachieng merged commit c43f024 into vnext Aug 15, 2022
@millicentachieng 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

3 participants