Update dependency jsonschema-rs to ^0.46.0#80
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
7e64616 to
24c356a
Compare
24c356a to
9e33624
Compare
9e33624 to
79d5e10
Compare
79d5e10 to
e8919b3
Compare
e8919b3 to
94f307d
Compare
94f307d to
880f702
Compare
880f702 to
3d3cc36
Compare
3d3cc36 to
8320c66
Compare
ff7a442 to
03a0fde
Compare
03a0fde to
d067a62
Compare
d067a62 to
ce4c32b
Compare
ce4c32b to
75d3732
Compare
75d3732 to
2a32c8e
Compare
2a32c8e to
0c4674b
Compare
0c4674b to
f03183c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.29.0→^0.46.0Release Notes
Stranger6667/jsonschema (jsonschema-rs)
v0.46.2Fixed
requirednot enforced whenadditionalPropertiesis a schema object andrequiredlists exactly 2 keys.v0.46.1Fixed
requirednot enforced whenpropertieshas 15 or more entries andrequiredlists exactly 2 keys.v0.46.0Added
ValidatorMapfor validating instances against subschemas identified by URI-fragment JSON pointer. #1075-i/--instance(e.g.jsonschema validate schema.json -i *.json). #1085dereferencefunction to recursively inline$refreferences. #422jsonschema dereferencesubcommand to dereference a schema from the command line.Breaking Changes
with_registrynow borrows the prepared registry.ValidationOptions::with_resourceandValidationOptions::with_resourceswere removed in favor of building aRegistryfirst. See the Migration Guide for the details.Performance
v0.45.1Fixed
multipleOfvalidation for negative numeric instances.durationformat when hours and seconds appear without minutes, or years and days without months.v0.45.0Added
bundle(schema)/async_bundle(schema)/ValidationOptions::bundle: produce a Compound Schema Document with external$reftargets embedded in a draft-appropriate container (definitionsfor Draft 4/6/7,$defsfor Draft 2019-09/2020-12) while preserving$refvalues. #791.jsonschema validateandjsonschema bundlesubcommands. Flat invocation (jsonschema schema.json -i …) is deprecated — usejsonschema validateinstead. #791.ValidationError::absolute_keyword_location()to get the absolute keyword location URI of the schema node that produced the error. #737.Changed
ValidationError::into_parts()now returnsValidationErrorPartsinstead of a tuple.v0.44.1Fixed
hostnameformat now applies legacy RFC 1034 semantics in Draft 4/6 and keeps IDNA A-label validation in Draft 7+.v0.44.0Added
canonical::json::to_string(value)for canonical JSON serialization (stable key ordering and numeric normalization), useful for deduplicating equivalent JSON Schemas.Fixed
contentMediaType,contentEncoding, andcontentSchemakeywords.v0.43.0Performance
patternandpatternPropertiesfor^(a|b|c)$alternations via linear array scan.^\S*$patterns by replacing regex with a direct ECMA-262 whitespace check.Fixed
anyOf,format,unevaluatedProperties, andunevaluatedItemsnow correctly collect annotations per spec.v0.42.2Fixed
:–?(0x3A–0x3F) as valid digits duringdate,time, anddate-timeformat validation, potentially allowing malformed values to pass.Performance
patternprefix optimization to handle escaped slashes (^\/) and exact-match patterns (^\$ref$).enumfor cases when all variants are strings.v0.42.1Performance
$refresolution.format: "regex"validation.v0.42.0Added
JsonType::as_strmethod for zero-allocation type name access.ValidationErrorKind::keywordis now public.tls-ringfeature flag to opt into usingringas the TLS crypto provider instead of the defaultaws-lc-rs. #997.yaml/.yml) instance files in text output mode. #988Changed
aws-lc-rs. Users who needringcan opt in via thetls-ringfeature flag. This resolves potential conflicts with other libraries usingaws-lc-rs. #997Fixed
$reftargets that resolve to boolean schemas.Performance
OnceLockto avoid repeated formatting duringevaluate().v0.41.0Performance
uri-templateformat validation with a hand-rolled RFC 6570 parser.itemskeyword for simple type schemas ({"type": "string"},{"type": "number"}, etc.) to eliminate dynamic dispatch overhead.unevaluatedPropertiesvalidation via O(1) property lookup and short-circuitoneOfevaluation.v0.40.2Changed
trackerfield fromValidationErrorDebug output.aws-lc-rstoringto simplify building from source on some Linux distributions. #957Fixed
type: integervalidation in Draft 4 now correctly accepts large integers outside the i64/u64 range whenarbitrary-precisionfeature is enabled.v0.40.1Changed
ValidationErrorKind::Customnow includes akeywordfield containing the custom keyword name.Performance
patternPropertiesfor simple prefix patterns (e.g.,^x-).v0.40.0Added
HttpOptionsandValidationOptions::with_http_options()for configuring HTTP client behavior (timeouts, TLS verification, custom CA certificates) when fetching external schemas.--timeout,--connect-timeout,--insecure, and--cacertflags for HTTP configuration.v0.39.0Added
ValidationError::evaluation_path()for the dynamic path including$reftraversals.Changed
Keyword::validateno longer receives path parameters, andValidationError::customonly takes a message.Fixed
schemaLocationin evaluation output now excludes$ref/$dynamicRef/$recursiveRefper JSON Schema spec.Performance
evaluate(): 4.5-30x faster on complex schemas, 12-89% faster overall.oneOf/anyOf: ~4000x faster via memoization. #930v0.38.1Fixed
multipleOfvalidation for integer values between2^53andi64::MAXwitharbitrary-precisionfeature.v0.38.0Added
EmailOptionsfor configuringemailformat validation. #903Fixed
$refresolution when multiple refs target the same external URL with different fragments. #906multipleOfvalidation for large u64 values beyondi64::MAXwitharbitrary-precisionfeature.Validatornot beingSend + Syncon WASM targets. #915v0.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.Configuration
📅 Schedule: (UTC)
🚦 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.