router
router copied to clipboard
fix(deps): update rust crate jsonschema to 0.30.0
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| jsonschema | dependencies | minor | 0.17.1 -> 0.30.0 |
Release Notes
Stranger6667/jsonschema (jsonschema)
v0.30.0
Added
JsonTypeandJsonTypeSet.ValidationOptions::with_base_urithat allows for specifying a base URI for all relative references in the schema.- Configuration options for the underlying regex engine used by
patternandpatternPropertieskeywords.
Changed
- Better error messages for relative
$refwithout base URI.
Fixed
- CLI: Inability to load relative file
$ref. #​725
Removed
- Internal cache for regular expressions.
Deprecated
PrimitiveTypeandPrimitiveTypesBitMap.
v0.29.1
Added
Hash,PartialOrd,Ordandserde::SerializeforLocation.- Make
Location::joinpublic.
v0.29.0
Breaking Changes
-
All builder methods on
ValidationOptionsnow take ownership ofselfinstead of&mut self. This change enables better support for non-blocking retrieval of external resources during the process of building a validator. Update your code to chain the builder methods instead of reusing the options instance:// Before (0.28.x) let mut options = jsonschema::options(); options.with_draft(Draft::Draft202012); options.with_format("custom", my_format); let validator = options.build(&schema)?; // After (0.29.0) let validator = jsonschema::options() .with_draft(Draft::Draft202012) .with_format("custom", my_format) .build(&schema)?; -
The
Retrievetrait'sretrievemethod now accepts URI references as&Uri<String>instead of&Uri<&str>. This aligns with the async version and simplifies internal URI handling. The behavior and available methods remain the same, this is purely a type-level change.// Before fn retrieve(&self, uri: &Uri<&str>) -> Result<Value, Box<dyn std::error::Error + Send + Sync>> // After fn retrieve(&self, uri: &Uri<String>) -> Result<Value, Box<dyn std::error::Error + Send + Sync>> -
Simplified
Registrycreation API:- Removed
RegistryOptions::try_newandRegistryOptions::try_from_resourcesin favor ofRegistry::build - Removed
Registry::try_with_resource_and_retriever- useRegistry::options().retriever()instead - Registry creation is now consistently done through the builder pattern
// Before (0.28.x) let registry = Registry::options() .draft(Draft::Draft7) .try_new( "http://example.com/schema", resource )?; let registry = Registry::options() .draft(Draft::Draft7) .try_from_resources([ ("http://example.com/schema", resource) ].into_iter())?; let registry = Registry.try_with_resource_and_retriever( "http://example.com/schema", resource, retriever )?; // After (0.29.0) let registry = Registry::options() .draft(Draft::Draft7) .build([ ("http://example.com/schema", resource) ])?; let registry = Registry::options() .draft(Draft::Draft7) .build([ ("http://example.com/schema", resource) ])?; let registry = Registry::options() .retriever(retriever) .build(resources)?; - Removed
Added
- Support non-blocking retrieval for external resources during schema resolution via the new
resolve-asyncfeature. #​385 - Re-export
referencing::Registryasjsonschema::Registry. ValidationOptions::with_registrythat allows for providing a predefinedreferencing::Registry. #​682
Performance
- Significantly improved validator compilation speed by using pointer-based references to schema fragments instead of cloning them during traversal.
- Faster anchors & sub-resources lookups during validator compilation.
v0.28.3
Fixed
- Panic when schema registry base URI contains an unencoded fragment.
Performance
- Fewer JSON pointer lookups.
v0.28.2
Fixed
- Resolving external references that nested inside local references. #​671
- Resolving relative references with fragments against base URIs that also contain fragments. #​666
Performance
- Faster JSON pointer resolution.
v0.28.1
Fixed
- Handle fragment references within
$id-anchored subschemas. #​640
v0.28.0
Added
- Implement
IntoIteratorforLocationto iterate overLocationSegment. - Implement
FromIterforLocationto build aLocationfrom an iterator ofLocationSegment. ValidationError::to_ownedmethod for converting errors into owned versions.- Meta-schema validation support. #​442
v0.27.1
Added
- Implement
ExactSizeIteratorforPrimitiveTypesBitMapIterator.
v0.27.0
Added
- Added
masked()andmasked_with()methods toValidationErrorto support hiding sensitive data in error messages. #​434
Changed
- Improved error message for unknown formats.
- Bump MSRV to
1.71.1.
v0.26.2
Documentation
- Fix documentation for
validate
v0.26.1
Fixed
- Return "Unknown specification" error on
https-prefixed$schemafor Draft 4, 5, 6. #​629
v0.26.0
Important: This release contains breaking changes. See the Migration Guide for details on transitioning to the new API.
Added
Validator::iter_errorsthat iterates over all validation errors.
Changed
- BREAKING: Remove unused
ValidationErrorKind::JSONParse,ValidationErrorKind::InvalidReference,ValidationErrorKind::Schema,ValidationErrorKind::FileNotFoundandValidationErrorKind::Utf8. - BREAKING:
Validator::validatenow returns the first error instead of an iterator in theErrvariant.
Performance
- Optimize error formatting in some cases.
v0.25.1
Fixed
- Re-export
referencing::ErrorasReferencingError. #​614
v0.25.0
Important: This release removes deprecated old APIs. See the Migration Guide for details on transitioning to the new API.
Changed
- BREAKING: Default to Draft 2020-12.
Removed
- Deprecated
draft201909,draft202012, andclifeatures. - Deprecated
CompilationOptions,JSONSchema,PathChunkRef,JsonPointerNode, andSchemaResolverErroraliases. - Deprecated
jsonschema::compile,Validator::compile,ValidationOptions::compile,ValidationOptions::with_resolver,ValidationOptions::with_meta_schemas,ValidationOptions::with_documentfunctions. - Deprecated
SchemaResolvertrait.
v0.24.3
Fixed
- Infinite recursion when using mutually recursive
$refinunevaluatedProperties.
v0.24.2
Fixed
- Infinite recursion in some cases. #​146
$refinteraction with$recursiveAnchorin Draft 2019-09.unevaluatedPropertieswith$recursiveRef&$dynamicRef.
v0.24.1
Fixed
- Incomplete external reference resolution.
v0.24.0
Added
- Support
$ref,$recursiveRef, and$dynamicRefinunevaluatedItems. #​287 - Support for
$vocabulary. #​263
Changed
- Ignore
prefixItemsunder Draft 2019-09 as it was introduced in Draft 2020-12.
Fixed
- Numbers with zero fraction incorrectly handled in
uniqueItems.
Performance
- Speedup
apply.
v0.23.0
Added
- Partial support for
unevaluatedItems, excluding references.
Changed
- Improve error messages on WASM. #​568
- Improve error messages on URI resolving and parsing.
- BREAKING: Replace
JsonPointerin favor ofLocation.
Deprecated
PathChunkRefin favor ofLocationSegment.JsonPointerNodein favor ofLazyLocation.
Fixed
- Resolving file references on Windows. #​441
- Missing annotations from by-reference applicators. #​403
- Relative keyword locations missing by-reference applicators (such as
$refor$dynamicRef).
Performance
- Faster building of a validator.
- Speedup
hostname&idn-hostnameformats validation. - Speedup
apply.
Removed
JsonPointerNode::to_vecwithout a replacement.
v0.22.3
Performance
- Speedup resolving.
v0.22.2
Fixed
- ECMAScript 262 regex support.
Performance
- Speedup
json-pointerandrelative-json-pointerformats validation.
v0.22.1
Fixed
- Removed
dbg!macro.
v0.22.0
Changed
- Extend email validation. #​471
- BREAKING: Custom retrievers now receive
&Uri<&str>instead of&UriRef<&str> - Bump
once_cellto1.20. - Bump
regexto1.11.
Fixed
timeformat validation (leap seconds and second fractions).durationformat validation.- Panic on root
$idwithout base. #​547 hostnameformat validation (double dot).idn-hostnameformat validation. #​101
Performance
- Faster building of a validator.
- Speedup
hostname,date,time,date-time, anddurationformats validation. - Cache regular expressions for
pattern. #​417
v0.21.0
Important: This release brings a complete rework of reference resolving which deprecates some older APIs. 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
$anchorsupport.$recursiveRef&$recursiveAnchorsupport in Draft 2019-09.$dynamicRef&$dynamicAnchorsupport in Draft 2020-12.
Changed
- BREAKING: Treat
$refas URI, not URL, and additionally normalize them. #​454 - BREAKING: Resolve all non-recursive references eagerly.
- BREAKING: Disallow use of fragments in
$id. #​264
Deprecated
SchemaResolvertrait andSchemaResolverErrorin favor of a simplerRetrievethat works withBox<dyn std::error::Error>. In turn, it also deprecatesValidationOptions::with_resolverin favor ofValidationOptions::with_retrieverValidationOptions::with_documentin favor ofValidationOptions::with_resource.
Fixed
- Infinite recursion in
unevaluatedProperties. #​420 - Cross-draft validation from newer to older ones.
- Changing base URI in folder.
- Location-independent identifier in remote resource.
- Missing some format validation for Draft 2020-12.
- Incomplete
iri&iri-referencevalidation.
Performance
- Faster validation for
uri,iri,uri-reference, andiri-referenceformats.
v0.20.0
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::draft4jsonschema::draft6jsonschema::draft7jsonschema::draft201909jsonschema::draft202012Each 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
Debugimplementation forSchemaNodeopaque. - Make
jsonschema::validator_forand related functions returnValidationError<'static>in theirErrvariant. This change makes possible to use the?operator to return errors from functions where the input schema is defined.
Deprecated
- Rename
CompilationOptionstoValidationOptionsfor clarity. - Rename
JSONSchematoValidatorfor clarity. #​424 - Rename
JSONPointertoJsonPointerfor consistency with naming conventions. #​424 - Rename
jsonschema::compiletojsonschema::validator_for. - Rename
CompilationOptions::compiletoValidationOptions::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.
v0.19.1
Fixed
ipv4format validation. #​512
v0.19.0
Added
jsonschema::compileshortcut.
Changed
- Bump MSRV to
1.70.
Fixed
uuidformat validation.- Combination of
unevaluatedPropertieswithallOfandoneOf. #​496
Deprecated
clifeature in favor of a separatejsonschema-clicrate.draft201909anddraft202012features. The relevant functionality is now enabled by default.
Performance
uuidvalidation viauuid-simd.
v0.18.3
Fixed
- Changing base URI when
$refis present in drafts 7 and earlier. - Removed
dbg!macro.
v0.18.2
Fixed
- Ignoring
$schemain resolved references. - Support integer-valued numbers for
maxItems,maxLength,maxProperties,maxContains,minItems,minLength,minProperties,minContains.
Deprecated
with_meta_schemas()method. Meta schemas are included by default.
v0.18.1
Added
ErrorDescription::into_innerto retrieve the innerStringvalue.
v0.18.0
Added
- Custom keywords support. #​379
- Expose
JsonPointerNodethat can be converted intoJSONPointer. This is needed for the upcoming custom validators support.
Changed
- Bump
base64to0.22. - Bump
clapto4.5. - Bump
fancy-regexto0.13. - Bump
fractionto0.15. - Bump
memchrto2.7. - Bump
once_cellto1.19. - Bump
percent-encodingto2.3. - Bump
regexto1.10. - Bump
urlto2.5. - Build CLI only if the
clifeature is enabled. - BREAKING: Extend
CompilationOptionsto support more ways to define custom format checkers (for example in Python bindings). In turn it changesValidationErrorKind::Formatto contain aStringinstead of a&'static str.
Fixed
- Incorrect
schema_pathwhen multiple errors coming from the$refkeyword #​426
Performance
- Optimize building
JSONPointerfor validation errors by allocating the exact amount of memory needed. - Avoid cloning path segments during validation.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.