fix(deps): update rust crate jsonschema to 0.37 #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.17->0.37Release Notes
Stranger6667/jsonschema (jsonschema)
v0.37.4Fixed
$refchains (e.g.,a->b->a).$refresolution within fragment-extracted external resources. #892Removed
PrimitiveType&PrimitiveTypesBitMap.v0.37.3Fixed
$reftargets. #892v0.37.2Added
JsonTypeSet::len()andJsonTypeSet::remove()helpers for managing type sets.Fixed
$refreferences. #892v0.37.1Fixed
$refvalue. #886v0.37.0Added
evaluate()top-level function for convenient access to structured validation output.contentEncodingvalues per RFC 4648:base64url,base32,base32hex, andbase16. These encodings are now validated alongside the existingbase64support in Draft 6 and 7. #26validator.iter_errors(instance).into_errors(). It returns aValidationErrorstype that collects validation errors and implementsstd::error::Error. #451Changed
ValidationErrorfields are private; useinstance(),kind(),instance_path(), andschema_path()instead of accessing struct fields directly.ErrorIteratoris now a newtype wrapper instead ofBox<dyn ValidationErrorIterator>.Performance
validateand other APIs returningResult<_, ValidationError>are 5–10% faster in some workloads due to the smaller error handle.evaluate: Avoiding deep clones of unmatched keyword values (e.g.,title,description,examples) on every schema node evaluation by usingArcinternally. Can be multiple times faster for schemas with large annotations.v0.36.0Added
--output flag|list|hierarchicalmodes now stream newline-delimited JSON records with schema/instance metadata plus JSON Schema Output v1 payloads (defaulttextoutput remains human-readable).--errors-onlyflag to suppress successful validation output and only show failures.Validator::evaluate()API exposes JSON Schema Output v1 (flag/list/hierarchical) reports along with iterator helpers for annotations and errors.meta::validator_for()function to build validators for meta-schema validation with fullValidatorAPI access.Validatornow implementsClone. #809Removed
Validator::apply(),Output, andBasicOutputtypes have been removed in favor of the richerevaluate()API.v0.35.0Added
$schemaURIs can now be used by registering their meta-schemas in theRegistryviajsonschema::options().with_registry(). #664arbitrary-precisionfeature for exact numeric validation of large integers and decimals beyond standard floating-point limits. #103$schemaURIs for drafts 04, 06, and 07 (e.g.,https://json-schema.org/draft-07/schema). #802Changed
meta::is_validnow panics for unknown$schemavalues instead of defaulting to Draft 2020-12.meta::validatereturns an error for unknown$schemavalues. Usemeta::options().with_registry()to validate schemas against custom meta-schemas.Resource::from_contentsno longer returnsResultand always succeeds, since draft detection no longer fails for unknown$schemavalues.Removed
meta::try_is_validandmeta::try_validate. Usemeta::is_validandmeta::validateinstead.primitive_typemodule (deprecated since 0.30.0). Usejsonschema::typesinstead.Performance
required: short-circuit when the instance object has fewer properties than required keys.v0.34.0Changed
BasicOutputandAnnotationsno longer have lifetime parameters. Update type annotations fromBasicOutput<'a>toBasicOutputandAnnotations<'a>toAnnotations.referencing: URI caching now avoids hash collisions and reduces lock contention.fluent-urito0.4.1.1.83.0.Send + Syncbounds fromRetrieve/AsyncRetrieveonwasm32.draftX::meta::validator()helper so meta-schema validators lazy-init onwasm32while native targets keep borrowing the cachedjsonschema::meta::MetaValidator.Fixed
xn--labels, reject leading combining marks/uppercase prefixes, and enforce the latest JSON Schema punycode context rules.wasm32-unknown-unknownsupport. #785Performance
applynow reuses cached schema locations, URI fragments, and buffers for up to ~2.5x faster validation.$refcompilation deduplicates validator nodes, which decreases the memory usage and improves performance.applyon location-heavy workloads.unevaluatedPropertiesvalidation is 25-35% faster through optimized property marking and early-exit paths.unevaluatedPropertiesmemory usage drastically reduced by eliminating redundant registry clones during compilation.unevaluatedItemsvalidation is ~10% faster through early-exit optimizations and eliminating redundant validations in combinators.Removed
Validator::configto reduce the memory footprint.DRAFT4_META_VALIDATOR,DRAFT6_META_VALIDATOR,DRAFT7_META_VALIDATOR,DRAFT201909_META_VALIDATOR, andDRAFT202012_META_VALIDATORstatics. UsedraftX::meta::validator()helper functions instead (e.g.,draft7::meta::validator()).v0.33.0Fixed
instance_pathsegments are now unescaped when iterating.LocationSegment::Propertynow holdsCow<'_, str>andLocationSegmentis no longerCopy. #788v0.32.1Changed
fancy-regexto0.16.v0.32.0Added
contextfield toValidationErrorKind::OneOfMultipleValid.Changed
enum.v0.31.0Added
-d, --draft <4|6|7|2019|2020>to enforce a specific JSON Schema draft.--assert-formatand--no-assert-formatto toggle validation offormatkeywords.contextforValidationErrorKind::AnyOfandValidationErrorKind::OneOfNotValidwhich contains errors for all subschemas, each inside a separate vector with an index matching subschema ID.Fixed
multipleOffor float values.Changed
fancy-regexto0.15.v0.30.0Added
$schemaURIs can now be used by registering their meta-schemas in theRegistryviajsonschema::options().with_registry(). #664arbitrary-precisionfeature for exact numeric validation of large integers and decimals beyond standard floating-point limits. #103$schemaURIs for drafts 04, 06, and 07 (e.g.,https://json-schema.org/draft-07/schema). #802Changed
meta::is_validnow panics for unknown$schemavalues instead of defaulting to Draft 2020-12.meta::validatereturns an error for unknown$schemavalues. Usemeta::options().with_registry()to validate schemas against custom meta-schemas.Resource::from_contentsno longer returnsResultand always succeeds, since draft detection no longer fails for unknown$schemavalues.Removed
meta::try_is_validandmeta::try_validate. Usemeta::is_validandmeta::validateinstead.primitive_typemodule (deprecated since 0.30.0). Usejsonschema::typesinstead.Performance
required: short-circuit when the instance object has fewer properties than required keys.v0.29.1Added
Hash,PartialOrd,Ordandserde::SerializeforLocation.Location::joinpublic.v0.29.0Breaking 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:
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.
Simplified
Registrycreation API:RegistryOptions::try_newandRegistryOptions::try_from_resourcesin favor ofRegistry::buildRegistry::try_with_resource_and_retriever- useRegistry::options().retriever()insteadAdded
resolve-asyncfeature. #385referencing::Registryasjsonschema::Registry.ValidationOptions::with_registrythat allows for providing a predefinedreferencing::Registry. #682Performance
0.28.3 - 2025-01-24
Fixed
Performance
0.28.2 - 2025-01-22
Fixed
Performance
0.28.1 - 2024-12-31
Fixed
$id-anchored subschemas. #6400.28.0 - 2024-12-29
Added
IntoIteratorforLocationto iterate overLocationSegment.FromIterforLocationto build aLocationfrom an iterator ofLocationSegment.ValidationError::to_ownedmethod for converting errors into owned versions.0.27.1 - 2024-12-24
Added
ExactSizeIteratorforPrimitiveTypesBitMapIterator.0.27.0 - 2024-12-23
Added
masked()andmasked_with()methods toValidationErrorto support hiding sensitive data in error messages. #434Changed
1.71.1.0.26.2 - 2024-12-16
Documentation
validate0.26.1 - 2024-10-29
Fixed
https-prefixed$schemafor Draft 4, 5, 6. #6290.26.0 - 2024-10-26
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
ValidationErrorKind::JSONParse,ValidationErrorKind::InvalidReference,ValidationErrorKind::Schema,ValidationErrorKind::FileNotFoundandValidationErrorKind::Utf8.Validator::validatenow returns the first error instead of an iterator in theErrvariant.Performance
0.25.1 - 2024-10-25
Fixed
referencing::ErrorasReferencingError. #6140.25.0 - 2024-10-24
Important: This release removes deprecated old APIs. See the Migration Guide for details on transitioning to the new API.
Changed
Removed
draft201909,draft202012, andclifeatures.CompilationOptions,JSONSchema,PathChunkRef,JsonPointerNode, andSchemaResolverErroraliases.jsonschema::compile,Validator::compile,ValidationOptions::compile,ValidationOptions::with_resolver,ValidationOptions::with_meta_schemas,ValidationOptions::with_documentfunctions.SchemaResolvertrait.0.24.3 - 2024-10-24
Fixed
$refinunevaluatedProperties.0.24.2 - 2024-10-24
Fixed
$refinteraction with$recursiveAnchorin Draft 2019-09.unevaluatedPropertieswith$recursiveRef&$dynamicRef.0.24.1 - 2024-10-21
Fixed
0.24.0 - 2024-10-20
Added
$ref,$recursiveRef, and$dynamicRefinunevaluatedItems. #287$vocabulary. #263Changed
prefixItemsunder Draft 2019-09 as it was introduced in Draft 2020-12.Fixed
uniqueItems.Performance
apply.0.23.0 - 2024-10-12
Added
unevaluatedItems, excluding references.Changed
JsonPointerin favor ofLocation.Deprecated
PathChunkRefin favor ofLocationSegment.JsonPointerNodein favor ofLazyLocation.Fixed
$refor$dynamicRef).Performance
hostname&idn-hostnameformats validation.apply.Removed
JsonPointerNode::to_vecwithout a replacement.0.22.3 - 2024-10-05
Performance
0.22.2 - 2024-10-04
Fixed
Performance
json-pointerandrelative-json-pointerformats validation.0.22.1 - 2024-10-03
Fixed
dbg!macro.0.22.0 - 2024-10-03
Changed
&Uri<&str>instead of&UriRef<&str>once_cellto1.20.regexto1.11.Fixed
timeformat validation (leap seconds and second fractions).durationformat validation.$idwithout base. #547hostnameformat validation (double dot).idn-hostnameformat validation. #101Performance
hostname,date,time,date-time, anddurationformats validation.pattern. #4170.21.0 - 2024-09-29
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
$refas URI, not URL, and additionally normalize them. #454$id. #264Deprecated
SchemaResolvertrait andSchemaResolverErrorin favor of a simplerRetrievethat works withBox<dyn std::error::Error>.In turn, it also deprecates
ValidationOptions::with_resolverin favor ofValidationOptions::with_retrieverValidationOptions::with_documentin favor ofValidationOptions::with_resource.Fixed
unevaluatedProperties. #420iri&iri-referencevalidation.Performance
uri,iri,uri-reference, andiri-referenceformats.0.20.0 - 2024-09-18
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
jsonschema::draft4jsonschema::draft6jsonschema::draft7jsonschema::draft201909jsonschema::draft202012Each module provides
new(),is_valid(), andoptions()functions.jsonschema::options()function as a shortcut forjsonschema::Validator::options(), that allows for customization of the validation process.Changed
Debugimplementation forSchemaNodeopaque.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
CompilationOptionstoValidationOptionsfor clarity.JSONSchematoValidatorfor clarity. #424JSONPointertoJsonPointerfor consistency with naming conventions. #424jsonschema::compiletojsonschema::validator_for.CompilationOptions::compiletoValidationOptions::build.Old names are retained for backward compatibility but will be removed in a future release.
Fixed
0.19.1 - 2024-09-15
Fixed
ipv4format validation. #5120.19.0 - 2024-09-14
Added
jsonschema::compileshortcut.Changed
1.70.Fixed
uuidformat validation.unevaluatedPropertieswithallOfandoneOf. #496Deprecated
clifeature in favor of a separatejsonschema-clicrate.draft201909anddraft202012features. The relevant functionality is now enabled by default.Performance
uuidvalidation viauuid-simd.0.18.3 - 2024-09-12
Fixed
$refis present in drafts 7 and earlier.dbg!macro.0.18.2 - 2024-09-11
Fixed
$schemain resolved references.maxItems,maxLength,maxProperties,maxContains,minItems,minLength,minProperties,minContains.Deprecated
with_meta_schemas()method. Meta schemas are included by default.0.18.1 - 2024-08-24
Added
ErrorDescription::into_innerto retrieve the innerStringvalue.0.18.0 - 2024-05-07
Added
JsonPointerNodethat can be converted intoJSONPointer.This is needed for the upcoming custom validators support.
Changed
base64to0.22.clapto4.5.fancy-regexto0.13.fractionto0.15.memchrto2.7.once_cellto1.19.percent-encodingto2.3.regexto1.10.urlto2.5.clifeature is enabled.CompilationOptionsto support more ways to define custom format checkers (for example in Python bindings).In turn it changes
ValidationErrorKind::Formatto contain aStringinstead of a&'static str.Fixed
schema_pathwhen multiple errors coming from the$refkeyword #426Performance
JSONPointerfor validation errors by allocating the exact amount of memory needed.0.17.1 - 2023-07-05
Changed
oneOf/anyOfkeywords. #429Fixed
unevaluatedProperties. #4210.17.0 - 2023-03-16
Changed
base64to0.21.fancy-regexto0.11.fractionto0.13.iso8601to0.6.lazy_staticwithonce_cell.unevaluatedProperties. (gated by thedraft201909/draft202012feature flags). #288$refis now evaluated alongsideother keywords. #378
0.16.1 - 2022-10-20
Added
should_ignore_unknown_formats()) that allows treating unknown formats as compilation errors.0.16.0 - 2022-04-21
Fixed
resolve-fileonly. #358Changed
0.15.2 - 2022-04-10
Fixed
rustls. #3530.15.1 - 2022-04-02
Fixed
reqwest/native-tlsby default to avoid validation errors caused byreqwestmissing a TLS backend. #3430.15.0 - 2022-01-31
Added
SchemaResolvertrait to support resolving external schema references. #246resolve-filefeature to resolve external schema files viastd::fs. #76Changed
reqwestfeature was changed toresolve-http. #341Performance
serde::from_readerinstead ofserde::from_str.0.14.0 - 2022-01-23
Changed
itoato1.0. #337Performance
equal_arrayshelper.falseschemas.0.13.3 - 2021-12-08
Changed
BasicOutput.is_validpublic.Fixed
JSONSchema.applyon schemas withadditionalProperties,patternProperties, andpropertiescombined.JSONSchema.applyon schemas withifandthen(withoutelse) keywords. #318JSONSchema.applyon some schemas withprefixItemsanditems. It panicked ifitemsis an object and the length ofprefixItemsis greater than the length of the input array.Performance
JSONSchema, that lead to improvement in the compilation performance.multipleOfimplementation, which now can short-circuit in some cases.uniqueItemskeyword implementation.schemaargument from all methods of theValidatetrait.0.13.2 - 2021-11-04
Added
prefixItemskeyword. #303OutputUnit.0.13.1 - 2021-10-28
Fixed
derivefromserde.0.13.0 - 2021-10-28
Added
uuidformat validator. #266durationformat validator. #265formatkeyword. #261basic&flagoutput formatting styles. #100dependentRequired&dependentSchemaskeywords. #286reqwestfeatures.Changed
Draft201909variant for theDraftenum that is available only under thedraft201909feature. This feature is considered private and should not be used outside of the testing context.It allows us to add features from the 2019-09 Draft without exposing them in the public API. Therefore, support for this draft can be added incrementally.
Draftenum is now marked asnon_exhaustive.ValidationError::schemawas removed and the calls replaced by proper errors.Performance
PrimitiveTypesBitMapIteratorfrom 3 to 2 bytes. #282bytecountcrate formaxLength&minLengthkeywords, and for thehostnameformat.0.12.2 - 2021-10-21
Fixed
minimum,maximum,exclusiveMinimum,exclusiveMaximum. #215chronototime==0.3.3due to RUSTSEC-2020-0159 in oldertimeversions thatchronodepends on.0.12.1 - 2021-07-29
Fixed
enumkeyword in schemas. #2580.12.0 - 2021-07-24
Added
formatvalidators. #158Changed
Displayinstead ofToString.JSONSchemanow owns its data. #1450.11.0 - 2021-06-19
Added
ValidationError.schema_path. #199Fixed
/and~characters infmt::Displayimplementation forJSONPointer. #2330.10.0 - 2021-06-17
Added
and instead of
CompilationErrorthere will be the usualValidationError. #198Removed
CompilationError. UseValidationErrorinstead.0.9.1 - 2021-06-17
Fixed
formatvalidator incorrectly rejecting supported regex patterns. #2300.9.0 - 2021-05-07
Added
Fixed
emailformat validation. Relevant test case from the JSONSchema test suite -email.json.0.8.3 - 2021-05-05
Added
paths::JSONPointerimplementsIntoIteratoroverpaths::PathChunk.Fixed
patternProperties. #213arraytype in error messages fortypevalidators containing multiple values. #2160.8.2 - 2021-05-03
Performance
Stringallocations during validation.RwLock.read()calls in$refvalidators.uniqueItemsvalidator for short arrays.additionalProperties. Use vectors instead ofAHashMapif the number of properties is small.requiredvalidators.enumvalidators.allOfvalidators.patternPropertiesvalidators without definedadditionalProperties.Fixed
multipleOfvalidator. Relevant test case from the JSONSchema test suite -float_overflow.json.0.8.1 - 2021-04-30
Performance
Stringallocation inJSONPointer.into_vec.InstancePathwith stack-only linked list.0.8.0 - 2021-04-27
Changed
propertyNamesvalidator now contains the parent object in itsinstanceattribute instead of individual properties as strings.additionalPropertiesvalidator. After -Additional properties are not allowed ('faz' was unexpected), before -False schema does not allow '"faz"'.additionalPropertiesvalidator emits a single error for all unexpected properties instead of separate errors for each unexpected property.ValidationError.instance_pathis now a separate struct, that can be transformed toVec<String>or JSON Pointer of typeString.Fixed
instance_pathattributes are pointing to the proper location.0.7.0 - 2021-04-27
Added
ValidationError.instance_paththat shows the path to the erroneous part of the input instance.It has the
Vec<String>type and contains components of the relevant JSON pointer.Changed
ValidationErrorpublic. It allows the end-user to customize errors formatting.Fixed
constandenumkeywords. Fixes an issue checked by these testsrequiredkeyword implementation. #190Removed
ValidationErrorKind::Unexpected.0.6.1 - 2021-03-26
Fixed
\wand\Wcharacter groups inpatternkeywords. #180\\w) inpatternkeywords.0.6.0 - 2021-02-03
Fixed
additionalPropertiesvalidators.Performance
rayoninitemskeyword as it gives significant overhead for a general case.additionalProperties/properties/patternPropertiesvalidators. #1730.5.0 - 2021-01-29
Added
$refkeyword. #75Fixed
$idvalues with trailing#symbol. #163Performance
Removed
-V/--validatoroptions from the CLI. They were no-op and never worked.0.4.3 - 2020-12-11
Documentation
0.4.2 - 2020-12-11
Changed
pasteto dev dependencies.Fixed
enumandconstkeywords. #149datestrings with single-digit month and day values. #151Performance
0.4.1 - 2020-12-09
Fixed
typekeyword is a list of multiple values. #1470.4.0 - 2020-11-09
Added
ToStringtrait implementation for validators.JSONSchema::optionsto customiseJSONSchemacompilation #131contentEncodingandcontentMediaTypekeywordsFixed
idn-hostnameis not defined on draft 4 and draft 6)0.3.1 - 2020-06-21
Changed
codegen-unitsto 1. #104Fixed
itemsallows the presence of boolean schemas. #1150.3.0 - 2020-06-08
Added
is_validmethods for all keywords.rayoninitemskeyword validation.clippylints. #66Debugimplementation forJSONSchemaandResolver. #97Defaultimplementation forDraft.Changed
to_stringinstead offormat!. #85$refkeyword. #83typekeyword implementation. #78matchstatements during compilation functions resolving.expectinstead ofunwrapfor known cases when it is known that the code won't panic.formatcases.DEFAULT_SCOPEduring reference resolving.Value::as_*calls withif let.compilefunctions.formatkeyword compilation by using static strings.true,falseand$refvalidators.DEFAULT_ROOT_URLinJSONSchema::compile.scopeparsing inJSONSchema::compile.BTreeSetinadditionalPropertieskeyword during compilation to reduce the amount of copied data. #91Fixed
is_validforadditionalProperties: falsekeyword case. #61minimum,maximum,exclusiveMinimumandexclusiveMaximumvalidators. #840.2.0 - 2020-03-30
Added
is_validfor various validators.ErrorandDisplayforCompilationErrorChanged
ErrorIteratorSyncandSend.Fixed
CompilationErroron invalid input schemas instead of panic.0.1.0 - 2020-03-29
v0.28.3Breaking 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:
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.
Simplified
Registrycreation API:RegistryOptions::try_newandRegistryOptions::try_from_resourcesin favor ofRegistry::buildRegistry::try_with_resource_and_retriever- useRegistry::options().retriever()insteadAdded
resolve-asyncfeature. #385referencing::Registryasjsonschema::Registry.ValidationOptions::with_registrythat allows for providing a predefinedreferencing::Registry. #682Performance
0.28.3 - 2025-01-24
Fixed
Performance
0.28.2 - 2025-01-22
Fixed
Performance
0.28.1 - 2024-12-31
Fixed
$id-anchored subschemas. #6400.28.0 - 2024-12-29
Added
IntoIteratorforLocationto iterate overLocationSegment.FromIterforLocationto build aLocationfrom an iterator ofLocationSegment.ValidationError::to_ownedmethod for converting errors into owned versions.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.
This PR was generated by Mend Renovate. View the repository job log.