Stranger6667
released this
18 Sep 20:56
·
6 commits
to master
since this release
Important: This release includes several deprecations and renames. While backward compatibility is maintained for now, users are encouraged to update their code. See the Migration Guide for details on transitioning to the new API.
Added
- New draft-specific modules for easier version-targeted validation:
jsonschema::draft4
jsonschema::draft6
jsonschema::draft7
jsonschema::draft201909
jsonschema::draft202012
Each module providesnew()
,is_valid()
, andoptions()
functions.
jsonschema::options()
function as a shortcut forjsonschema::Validator::options()
, that allows for customization of the validation process.
Changed
- Make
Debug
implementation forSchemaNode
opaque. - Make
jsonschema::validator_for
and related functions returnValidationError<'static>
in theirErr
variant.
This change makes possible to use the?
operator to return errors from functions where the input schema is defined.
Deprecated
- Rename
CompilationOptions
toValidationOptions
for clarity. - Rename
JSONSchema
toValidator
for clarity. #424 - Rename
JSONPointer
toJsonPointer
for consistency with naming conventions. #424 - Rename
jsonschema::compile
tojsonschema::validator_for
. - Rename
CompilationOptions::compile
toValidationOptions::build
.
Old names are retained for backward compatibility but will be removed in a future release.
Fixed
- Location-independent references in remote schemas on drafts 4, 6, and 7.