Add test for casting AllOf with one schema having additionalProperties: false #681
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello 🌈 !
I had a bit of a hard time tracing back the cause of the cast validation error that I was having:
since the resulting response had the correct shape and the right properties. I only hit the validation error when using the
assert_schema
function in my tests.The problem was that one of my schema had
additionalProperties: false
from back when we created the schema some years ago 👵I thought that adding a unit test covering this case can help developers finding out what's going on (it would have helped me at least, since I was looking at this test file to understand what was different between my code and the working examples).
For additional context: the validation error did not pop up for version 3.12.0, and only started to come up on 3.14+.