-
Notifications
You must be signed in to change notification settings - Fork 356
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
Bug: incorrect handling of minProperties and maxProperties in optional attribute #215
Comments
@rtucek good find. Pull requests welcome 😉 |
…an object but also not an instance of itself.
* fix-issue-215: Added a regression test for jsonrainbow#215. This patch fixes jsonrainbow#215 by ensuring that $value is not just an object but also not an instance of itself.
Here we got #224: |
* fix-issue-215: This patch fixes jsonrainbow#215 by ensuring that $value is not just an object but also not an instance of itself. Added a regression test. Rebased for jsonrainbow#224
Ok, so after my little PR mess, I've provided 2 different approaches for fixing the issue. #232 as you suggested Note that this time I haven't submitted a test. So far, so good, but it's false-failing against my document which is perfectly valid, but I little more complex compared the standard tests (and that's how you trigger the bug in this library, having some nested constraints). And this was the reason why I used this document as a regression test - just for having a pre-post comparison and for demonstrating the code change. |
Closed with #232 |
Given schema:
And this data:
Proofed by http://jsonschemalint.com/draft4/ the json is valid.
However the validator is returning the following error:
This should not happen because the property rooms is not given.
Thus their is no reason for a check on maxProperties constraint.
The text was updated successfully, but these errors were encountered: