Proposal: Validate: rich error reporting
Open
enhancement
- Dominant language
- Go
- Stars
- 478
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
When I validate the schema, I get an opaque error which I cannot action. As an example, I'd like to get a jsonpath to the offending node, so that I'd be able to present it to the user.
**Describe the solution you'd like**
Expose an `Error/ValidationError/other` struct which I would be able to cast the error to via `errors.As()` and get the JSONPath to the offending node of the document, as well as the JSONPath to the Schema node(s).
Getting a pointer to the exact Schema/object node would be the easiest way to inspect the nodes, but it has its own set of problems.
Contributor guide
Assessment
This issue has not been assessed yet.