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(model): respect discriminators with Model.validate()
#12824
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
well, after the change the error changed, but i cannot quite find the reason why it still complains about overwriting a model (all the files involved have a maybe it is related that |
@hasezoey |
what is different compared to
from what i can tell, it does not make it pass - that is why i had changed it to match the other test files (because of mocha's environment bleeding) ... maybe add a |
Fix #12621
Summary
Model.validate()
just uses the model's schema, doesn't look for a discriminator key inobj
. This PR fixes that issue. Also separated outModel.validate
tests into a separate file.Examples