Open b5 opened 6 years ago
You might be interested in the discussion going on at https://github.com/json-schema-org/json-schema-spec/issues/396 regarding possibly adding a recommended output/error format to the specification. Difficulty with error reporting has become a very common complaint across implementations.
Note that a set of output format recommendations did make it into the latest draft.
Yesterday I made a bonehead mistake & wrote something like the following schema:
So, uh there's a bunch of things wrong with ☝️
fields
should beitems
(in both cases)name
should betitle
The error returned gave me zero indication of how to fix the schema. This was in the context of adding data to qri, where problems can arise in a number of places, which sent me off hunting for bugs that didn't exist.
While I don't expect the returned error to catch something like "blah should actually be a blah field", jsonschemas can become quite large documents, so I'd like to upgrade parsing a jsonschema error returns to do two new things:
By "independant of go syntax", I mean we should try to say things like:
fields is not a valid jsonschema validator
and once I fix the first "fields" (but not the second), it'd be great ifitems.fields is not a valid jsonschema validator
and when that's fixed:items.fields.name is not a valid jsonschema validator
, etc.