You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
return a human-readable error that's as independent of go syntax as possible
return the _ first location in the document that failed to parse_
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 if items.fields is not a valid jsonschema validator
and when that's fixed: items.fields.name is not a valid jsonschema validator, etc.
The text was updated successfully, but these errors were encountered:
You might be interested in the discussion going on at json-schema-org/json-schema-spec#396 regarding possibly adding a recommended output/error format to the specification. Difficulty with error reporting has become a very common complaint across implementations.
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 if
items.fields is not a valid jsonschema validator
and when that's fixed:
items.fields.name is not a valid jsonschema validator
, etc.The text was updated successfully, but these errors were encountered: