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(schema): propagate strictQuery to implicitly created schemas for embedded discriminators #12827

Merged
merged 1 commit into from Dec 26, 2022

Conversation

vkarpov15
Copy link
Collaborator

Fix #12796

Summary

The root cause of #12796 is that we don't propagate strictQuery to implicitly created schemas like we do strict. So if global strictQuery is false, but the implicitly created schema's strictQuery is true. That gets even more confusing because embedded discriminator schemas do pick up the global strictQuery default, so with global strictQuery = false you get an error every time you create an embedded discriminator.

Examples

Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

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

LGTM

@vkarpov15 vkarpov15 merged commit 2bf15d5 into master Dec 26, 2022
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-12796 branch December 26, 2022 22:15
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.

Cannot set strictQuery: false globally and have an embedded discriminator
2 participants