Repository navigation
Releases: Stranger6667/jsonschema
Releases · Stranger6667/jsonschema
Release list
[Ruby] Release 0.60.1
Fixed
- Wrong results in
type: integer,const,enum,uniqueItems,multipleOf,minimum,maximum,exclusiveMinimumandexclusiveMaximumfor numbers with exponents past one million, such as1e-2000000.
Performance
- Validation of numbers with many digits or large exponents in
const,enum,uniqueItems,type: integer,multipleOf,minimum,maximum,exclusiveMinimumandexclusiveMaximumtaking time growing faster than the square of the digit count, instead of at most the square. - Validation of numbers with more than ten thousand digits, written or implied by their exponent, taking time linear in their written length instead of quadratic in their digit count.
[Rust] Release 0.60.1
- Panic on numbers past
f64inconst,enum,minimum,maximum,exclusiveMinimum,exclusiveMaximumandtype: integerwhen another crate in the build enablesserde_json/arbitrary_precisionwhile thearbitrary-precisionfeature is off. #1790 #[jsonschema::validator]panicking during expansion, or generating code that panics, on schema numbers pastf64when another crate in the build enablesserde_json/arbitrary_precisionwhile thearbitrary-precisionfeature is off. Such numbers are compile errors, as without thatserde_jsonfeature. #1790const,enumanduniqueItemstreating objects with the same members in a different key order as unequal when another crate in the build enablesserde_json/preserve_order. #1791- Wrong results in
type: integer,const,enum,uniqueItems,multipleOf,minimum,maximum,exclusiveMinimumandexclusiveMaximumfor numbers with exponents past one million, such as1e-2000000, with thearbitrary-precisionfeature. #[jsonschema::validator]rejectingmultipleOfwith a positive divisor below the smallestf64, such as1e-400, with thearbitrary-precisionfeature.
Performance
- Validation of numbers with many digits or large exponents in
const,enum,uniqueItems,type: integer,multipleOf,minimum,maximum,exclusiveMinimumandexclusiveMaximumwith thearbitrary-precisionfeature taking time growing faster than the square of the digit count, instead of at most the square. - Validation of numbers with more than ten thousand digits, written or implied by their exponent, with the
arbitrary-precisionfeature taking time linear in their written length instead of quadratic in their digit count.
[Python] Release 0.60.1
Fixed
- Wrong results in
type: integer,const,enum,uniqueItems,multipleOf,minimum,maximum,exclusiveMinimumandexclusiveMaximumfor numbers with exponents past one million, such as1e-2000000.
Performance
- Validation of numbers with many digits or large exponents in
const,enum,uniqueItems,type: integer,multipleOf,minimum,maximum,exclusiveMinimumandexclusiveMaximumtaking time growing faster than the square of the digit count, instead of at most the square. - Validation of numbers with more than ten thousand digits, written or implied by their exponent, taking time linear in their written length instead of quadratic in their digit count.
[Rust] Release 0.60.0
Changed
ValidationErrorKind::EnumandValidationErrorKind::Constantholding their values asArc<Value>shared with the validator, instead of a copy per error. #1777
Performance
- Validation with unfinished regex matches running each such match once instead of once per run, and comparing errors across runs in linear time instead of quadratic. #1784
itemsandadditionalPropertieslooking up a single-keyword subschema once per array or object instead of once per value.is_validandvalidatereading fewer cache lines per subschema, by keeping error locations apart from validators.is_validon recursive schemas caching only$refresults that took many steps to compute, instead of every one.- Error evaluation paths taking memory linear in the
$refnesting depth, not quadratic. #1778
[Ruby] Release 0.60.0
Performance
- Validation with unfinished regex matches running each such match once instead of once per run, and comparing errors across runs in linear time instead of quadratic. #1784
itemsandadditionalPropertieslooking up a single-keyword subschema once per array or object instead of once per value.is_validandvalidatereading fewer cache lines per subschema, by keeping error locations apart from validators.is_validon recursive schemas caching only$refresults that took many steps to compute, instead of every one.- Error evaluation paths taking memory linear in the
$refnesting depth, not quadratic. #1778
[Python] Release 0.60.0
Added
- Support for Python 3.15.
Changed
- Update
pyo3to0.30. canonicalizeandcanonical.find_unsatisfiabletakeschemapositionally only, likebundleanddereference.
Fixed
- Type stubs rejecting valid usage:
dict | boolschemas,ReferencingErrorinexcept,matchon error kinds. import jsonschema_rs.canonical.jsonandimport jsonschema_rs.canonical.schemaraisingModuleNotFoundError.inspect.signatureof validator andEvaluationmethods missingself.ValidationErrorKindreportingbuiltinsas its module.validator_forreturning instances that failisinstancechecks againstValidatorand draft classes.
Performance
- Validation with unfinished regex matches running each such match once instead of once per run, and comparing errors across runs in linear time instead of quadratic. #1784
itemsandadditionalPropertieslooking up a single-keyword subschema once per array or object instead of once per value.is_validandvalidatereading fewer cache lines per subschema, by keeping error locations apart from validators.is_validon recursive schemas caching only$refresults that took many steps to compute, instead of every one.- Error evaluation paths taking memory linear in the
$refnesting depth, not quadratic. #1778
[Rust] Release 0.59.0
Added
- CLI:
-as a path reads the schema or an instance from stdin. - CLI:
-Vas the version flag;-vstays as an alias.
Changed
- CLI: Exit status
3for errors that prevent a verdict and2for usage errors, so1always means an invalid instance or schema. - CLI: Errors print to stderr instead of stdout.
- CLI:
--versionprintsjsonschema-cli <VERSION>instead ofVersion: <VERSION>.
Fixed
- CLI: Panic when stdout is closed early, as in
jsonschema-cli validate ... | head. - CLI: Missing file path in the error for an unreadable instance in text output.
- CLI:
jsonschema-cli bundle,jsonschema-cli dereferenceandjsonschema-cli canonicalizetruncating the--outputfile when the write fails partway. - CLI:
jsonschema-cli validate --helpdescribing--offlinein terms of--resource, whichvalidatedoes not accept. - CLI: Error and warning messages suggesting
jsonschemacommands instead of the installedjsonschema-clibinary. - Canonicalizing several subschemas of one prepared document, where a
$refin a later output could point at another subschema. canonicalizeleavingunevaluatedPropertiesorunevaluatedItemsbesideanyOforoneOfraw.canonicalizegiving a different form for aoneOfdepending on the order of its branches.canonicalizeoutput changing when canonicalized again, for anotover a$refit cannot fully negate.canonicalizeoutput changing when canonicalized again, for aoneOfwhose branches reduce to the same$ref.canonicalizeleaving ananyOfover many overlapping objects raw.canonicalizeleavingdependenciesordependentRequiredraw when their keys form a long chain or cycle.canonicalizetreating-0as a value distinct from0underarbitrary-precision.- Regex matches the engine cannot finish, such as on reaching the backtrack limit, counted as non-matches, letting
notorpatternPropertiesaccept invalid instances. #1715 canonicalizetreating regex matches the engine cannot finish as non-matches.
Performance
canonicalizegiving up sooner on anallOfover unions too wide to model.
[Ruby] Release 0.59.0
Fixed
- Canonicalizing several subschemas of one prepared document, where a
$refin a later output could point at another subschema. canonicalizeleavingunevaluatedPropertiesorunevaluatedItemsbesideanyOforoneOfraw.canonicalizegiving a different form for aoneOfdepending on the order of its branches.canonicalizeoutput changing when canonicalized again, for anotover a$refit cannot fully negate.canonicalizeoutput changing when canonicalized again, for aoneOfwhose branches reduce to the same$ref.canonicalizeleaving ananyOfover many overlapping objects raw.canonicalizeleavingdependenciesordependentRequiredraw when their keys form a long chain or cycle.- Regex matches the engine cannot finish, such as on reaching the backtrack limit, counted as non-matches, letting
notorpatternPropertiesaccept invalid instances. #1715 canonicalizetreating regex matches the engine cannot finish as non-matches.
Performance
canonicalizegiving up sooner on anallOfover unions too wide to model.
[Python] Release 0.59.0
Changed
- macOS
arm64wheel replaces theuniversal2wheel.
Fixed
- Canonicalizing several subschemas of one prepared document, where a
$refin a later output could point at another subschema. canonicalizeleavingunevaluatedPropertiesorunevaluatedItemsbesideanyOforoneOfraw.canonicalizegiving a different form for aoneOfdepending on the order of its branches.canonicalizeoutput changing when canonicalized again, for anotover a$refit cannot fully negate.canonicalizeoutput changing when canonicalized again, for aoneOfwhose branches reduce to the same$ref.canonicalizeleaving ananyOfover many overlapping objects raw.canonicalizeleavingdependenciesordependentRequiredraw when their keys form a long chain or cycle.- Regex matches the engine cannot finish, such as on reaching the backtrack limit, counted as non-matches, letting
notorpatternPropertiesaccept invalid instances. #1715 canonicalizetreating regex matches the engine cannot finish as non-matches.
Performance
canonicalizegiving up sooner on anallOfover unions too wide to model.
[Rust] Release 0.58.6
Fixed
\sinpatternmissing most Unicode space separators and U+2028.- ECMA regex character class literals being interpreted as Rust set operators.