-
-
Notifications
You must be signed in to change notification settings - Fork 581
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
Wrong behaviour for enum keyword #1208
Conversation
for more information, see https://pre-commit.ci
There is currently no test for this PR, maybe you could give me a hint where to put it? |
Thanks for the PR! I haven't looked carefully at it yet, but as for:
The first step here would be a PR to the official JSON Schema test suite, specifically in the Once that's merged, we can bring the update in here, and then should be able to consider the PR. Can you have a look there and let me know if you run into any trouble? |
Thanks for your reply. I have created the PR: |
I'm not sure how implicit casting works in python, but is it possible that (I get that they're not the same in JSON.) |
@gregsdennis yes, that is right: |
Thanks again @otto-ifak! |
@Julian you're welcome - thank you for this great library 😄 |
The following schema accepts the instance although it should be rejected:
I guess, this is caused by the following line:
jsonschema/jsonschema/_keywords.py
Line 271 in 256dadd
(
[0] in [[False]]
is true, so[0] not in [[False]]
is false)📚 Documentation preview 📚: https://python-jsonschema--1208.org.readthedocs.build/en/1208/