-
Notifications
You must be signed in to change notification settings - Fork 25
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
If object uses additionalProperties: false and an input document contains a rogue key, obscure exception is raised #30
Comments
After the first look this seems like two separate problems:
|
I like the current behavior of not validating document fragments that are merged together. E.g., my schema has "requires" which is violated by many of the fragments. When I merge them together they produce a valid document. |
A small update regarding the issue of correctly supporting Boolean value as a valid schema was added in draft 6 (see changelog). So until This is the relevant issue for |
FWIW just glancing at this ticket because it's linked from that one now, (Might not change your response here though obviously) |
jsonschema draft 4 allows additionalProperties to be true and false, in addition to containing a subschema. Related to: #30
The exception that's raised by jsonmerge when @terrisgit if there's still some draft 4-compliant case where you get an error, please provide a test case. Otherwise I will close this issue. |
I fed a schema that uses "additionalProperties": false everywhere to a Merger. I then sent a bad document (because a key wasn't defined in properties:) to the Merger and got an AttributeError exception. Partial trace is below. It took me about an hour to figure out that my document was invalid. Great that I got an exception; not so good that the exception made no sense.
The text was updated successfully, but these errors were encountered: