Changes for version v0.3.0 - 2025-11-11
- Error Object Improvements
- Error reporting overhaul:
- Error objects (JSON::Schema::Validate::Error) now consistently carry: message, path (instance JSON Pointer), keyword (if known), and schema_pointer (JSON Pointer to the keyword that failed).
- Stringification shows "schema_pointer → path: message" when a schema pointer is available; otherwise "path: message".
- More precise messages across keywords (type, const, enum, string length/pattern, numeric bounds, contains/minContains/ maxContains, additionalProperties, unevaluated*, dependent*, oneOf/anyOf/allOf/not, content*).
- Resolver failures, unresolved $ref/$dynamicRef, and invalid JSON Pointer fragments now produce explicit, actionable messages (with keyword set to '$ref' where applicable).
- Error reporting overhaul:
- CLI
- Introduced jsonvalidate command-line tool (distribution: App::jsonvalidate) supporting: --schema / --instance / --json / --jsonl / --compile / --trace / --register-formats / --content-checks / --ignore-unknown-required-vocab / --max-errors / --normalize / --schema-base
- JSON output mode now includes structured errors: { path, message, keyword, schema_pointer }
- Documentation
- Expanded POD for JSON::Schema::Validate::Error, including constructor, getters/setters, as_string(), as_hash(), and behaviour of overloads.
Documentation
JSON Schema Exception
Modules
Lean, recursion-safe JSON Schema validator (Draft 2020-12)
Provides
in lib/JSON/Schema/Validate.pm