Report multiple 'leaf' errors rather than one schema error#51
Report multiple 'leaf' errors rather than one schema error#51leonid-s-usov wants to merge 1 commit intopython-jsonschema:masterfrom
Conversation
…alidation
With this change only simple type errors are reported - one will never
see an error saying that ' { "some" : "object" }' is not of type '{
"some": "schema" }'
|
Hi Julian, this is a follow up of the issue #50 - I am now using my personal account |
|
Hey! I didn't get a chance to play with this yet, but like I mentioned on #50, I like the idea that each validation error is a distinct thing wrong with the schema (so a schema with 3 errors had there distinct things wrong with it). If I understand what this pull request does, it would break that assumption, since now you'd get multiple errors that all essentially mean that something wasn't exactly the right type. I really do think that the debug mode that I have in mind would help out here if your objective is to make it easier to see by inspection why a type check failed (and is even more useful in the general case), so let me do the 0.8 release (I'm missing some docs which is what's holding up the release) and then after that I'll show you what I have in mind and we can see if it helps this. |
|
Haven't forgotten about this either :). But it probably will wait till after 1.0.0 is released unfortunately. Also, reminding myself that the schema in #67 is a good example of one that produces a type message that is too hard to understand. |
|
I think #86 will take care of this when we get it in, the leaf errors will be in |
|
I was thinking the same thing, yeah. @leonid-s-usov sorry this took so long, but check out what just landed, see if it satisfies the use case you're trying to address. Feel free to reopen if you have more ideas. I still have a debug mode planned at some point too... |
0ba6722 As per the spec, only dotted-quad is an acceptable format for IPv4 addresses. 6c3ca30 Merge pull request #51 from ericgj/add/validator 9cbcd43 Merge pull request #50 from ericgj/add/not-blank-schema-test 78bccaf add json-schema-valid to list of validators 4fe00e9 add 'forbidden property' test (not with blank schema) cd2aa75 Merge pull request #49 from Acubed/develop 1186813 Add the enum/required test to draft4 too 30ca2fd Add tests for required/not required values with enums ae3050a Add Jsonary and tv4 to the list 6c02fd0 Merge pull request #47 from iclanzan/patch-1 dff064d Added Jassi library to the list. git-subtree-dir: json git-subtree-split: 0ba672265758f09405b14a6508ff696a35e857ca
Add ability to report all errors in case multiple nested types fail validation
With this change only simple type errors are reported - one will never
see an error saying that ' { "some" : "object" }' is not of type '{
"some": "schema" }'