-
-
Notifications
You must be signed in to change notification settings - Fork 593
Fix additionalItems behavior when items is not in tuple form. #35
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 additionalItems behavior when items is not in tuple form. #35
Conversation
Nice, glad that's paying off already :). Haven't looked at this yet but any idea what the merge conflict is? |
Conflicts: tests.py
Looks like I didn't branch from your latest master, I merged it. EDIT: Hmm, diff looks curious, maybe I didn't do that right. |
Ah, OK. Also this sounds a bit odd – is the behavior for |
Well, since |
Not sure I understood that, sorry. Why is |
|
Heh. So ugly asymmetry it is then. Alrighty, if that's what the schema says I guess. |
I don't really see it as asymmetry, it's just that |
This looks good, merged. Thanks. |
Two seemingly analogous schemas/instances (the ones I asked about) have different validations due to a hidden default for another property. I'd say that's really ugly. But hey, no room to complain at this point I guess. |
I guess the way I look at it is that EDIT: Maybe I'm just trying to justify it because I can't think of a better way. :P |
Actually, maybe I understand what you are saying, and maybe I can think of a better way. If default for EDIT: Actually, now that I think about it some more, it seems like the schema form for |
I opened a ticket over at json-schema to discuss this. json-schema/json-schema#29 |
Made a quick test runner for the new json validation tests and already found an issue.
The spec states that
additionalItems
should not do anything whenitems
is not in tuple form. Fixed this behavior and added an old style test for now. This also showcased an issue with the error message checking (and error message generation) for additionalItems which I also fixed.