-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I want to output the error that occurs in schema validation to the user.
Right now, we got something like this(from the docs):
// []jtd.ValidateError{
// jtd.ValidateError{
// InstancePath: []string{},
// SchemaPath: []string{"properties", "name"}
// },
// jtd.ValidateError{
// InstancePath: []string{"age"},
// SchemaPath: []string{"properties", "age", "type"}
// },
// jtd.ValidateError{
// InstancePath: []string{"phones", "1"},
// SchemaPath: []string{"properties", "phones", "elements", "type"}
// }
// }It would be nice to get an output like:
- property "name" is missing
- property "age" expected string found int
I could try to make my own output string but I am afraid I don't have all the data I need. Like the expected type and the one found in the json.
Metadata
Metadata
Assignees
Labels
No labels