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: do not use discriminator when specific schema was referenced in oneOf or anyOf #2153

Merged
merged 1 commit into from
Sep 6, 2022

Conversation

RomanHotsiy
Copy link
Member

What/Why/How?

When specific child schema is mentioned in anyOf or oneOf most likely it is meant to be the specific instance and not be discriminated.

Reference

Fixes #2133

Testing

Added a test.

Check yourself

  • Code is linted
  • Tested
  • All new/updated code is covered with tests

@RomanHotsiy RomanHotsiy requested a review from a team as a code owner September 6, 2022 03:45
@RomanHotsiy RomanHotsiy requested review from AlexVarchuk and removed request for a team September 6, 2022 03:45
@RomanHotsiy RomanHotsiy force-pushed the fix-direct-disriminator-in-anyof branch from 6b1c56b to d0c110e Compare September 6, 2022 03:48
@RomanHotsiy RomanHotsiy force-pushed the fix-direct-disriminator-in-anyof branch from d0c110e to 6c10de6 Compare September 6, 2022 03:49
@AlexVarchuk AlexVarchuk merged commit 6ac1e1e into master Sep 6, 2022
@AlexVarchuk AlexVarchuk deleted the fix-direct-disriminator-in-anyof branch September 6, 2022 08:43
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.

Another circular crash caused by discriminatos
2 participants