Skip to content

Releases: Stranger6667/jsonschema

[Ruby] Release 0.60.1

Choose a tag to compare

@github-actions github-actions released this 24 Oct 10:04
e9af61d

Fixed

  • Wrong results in type: integer, const, enum, uniqueItems, multipleOf, minimum, maximum, exclusiveMinimum and exclusiveMaximum for numbers with exponents past one million, such as 1e-2000000.

Performance

  • Validation of numbers with many digits or large exponents in const, enum, uniqueItems, type: integer, multipleOf, minimum, maximum, exclusiveMinimum and exclusiveMaximum 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, taking time linear in their written length instead of quadratic in their digit count.

[Rust] Release 0.60.1

Choose a tag to compare

@github-actions github-actions released this 24 Oct 07:25
4eb7a64
  • Panic on numbers past f64 in const, enum, minimum, maximum, exclusiveMinimum, exclusiveMaximum and type: integer when another crate in the build enables serde_json/arbitrary_precision while the arbitrary-precision feature is off. #1790
  • #[jsonschema::validator] panicking during expansion, or generating code that panics, on schema numbers past f64 when another crate in the build enables serde_json/arbitrary_precision while the arbitrary-precision feature is off. Such numbers are compile errors, as without that serde_json feature. #1790
  • const, enum and uniqueItems treating objects with the same members in a different key order as unequal when another crate in the build enables serde_json/preserve_order. #1791
  • Wrong results in type: integer, const, enum, uniqueItems, multipleOf, minimum, maximum, exclusiveMinimum and exclusiveMaximum for numbers with exponents past one million, such as 1e-2000000, with the arbitrary-precision feature.
  • #[jsonschema::validator] rejecting multipleOf with a positive divisor below the smallest f64, such as 1e-400, with the arbitrary-precision feature.

Performance

  • Validation of numbers with many digits or large exponents in const, enum, uniqueItems, type: integer, multipleOf, minimum, maximum, exclusiveMinimum and exclusiveMaximum with the arbitrary-precision feature 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-precision feature taking time linear in their written length instead of quadratic in their digit count.

[Python] Release 0.60.1

Choose a tag to compare

@github-actions github-actions released this 24 Oct 07:25
8aa123d

Fixed

  • Wrong results in type: integer, const, enum, uniqueItems, multipleOf, minimum, maximum, exclusiveMinimum and exclusiveMaximum for numbers with exponents past one million, such as 1e-2000000.

Performance

  • Validation of numbers with many digits or large exponents in const, enum, uniqueItems, type: integer, multipleOf, minimum, maximum, exclusiveMinimum and exclusiveMaximum 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, taking time linear in their written length instead of quadratic in their digit count.

[Rust] Release 0.60.0

Choose a tag to compare

@Stranger6667 Stranger6667 released this 22 Oct 08:45
316613f

Changed

  • ValidationErrorKind::Enum and ValidationErrorKind::Constant holding their values as Arc<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
  • items and additionalProperties looking up a single-keyword subschema once per array or object instead of once per value.
  • is_valid and validate reading fewer cache lines per subschema, by keeping error locations apart from validators.
  • is_valid on recursive schemas caching only $ref results that took many steps to compute, instead of every one.
  • Error evaluation paths taking memory linear in the $ref nesting depth, not quadratic. #1778

[Ruby] Release 0.60.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 09:00
edbbbea

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
  • items and additionalProperties looking up a single-keyword subschema once per array or object instead of once per value.
  • is_valid and validate reading fewer cache lines per subschema, by keeping error locations apart from validators.
  • is_valid on recursive schemas caching only $ref results that took many steps to compute, instead of every one.
  • Error evaluation paths taking memory linear in the $ref nesting depth, not quadratic. #1778

[Python] Release 0.60.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 10:29
dd3169e

Added

  • Support for Python 3.15.

Changed

  • Update pyo3 to 0.30.
  • canonicalize and canonical.find_unsatisfiable take schema positionally only, like bundle and dereference.

Fixed

  • Type stubs rejecting valid usage: dict | bool schemas, ReferencingError in except, match on error kinds.
  • import jsonschema_rs.canonical.json and import jsonschema_rs.canonical.schema raising ModuleNotFoundError.
  • inspect.signature of validator and Evaluation methods missing self.
  • ValidationErrorKind reporting builtins as its module.
  • validator_for returning instances that fail isinstance checks against Validator and 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
  • items and additionalProperties looking up a single-keyword subschema once per array or object instead of once per value.
  • is_valid and validate reading fewer cache lines per subschema, by keeping error locations apart from validators.
  • is_valid on recursive schemas caching only $ref results that took many steps to compute, instead of every one.
  • Error evaluation paths taking memory linear in the $ref nesting depth, not quadratic. #1778

[Rust] Release 0.59.0

Choose a tag to compare

@github-actions github-actions released this 16 Oct 20:39
d59ab79

Added

  • CLI: - as a path reads the schema or an instance from stdin.
  • CLI: -V as the version flag; -v stays as an alias.

Changed

  • CLI: Exit status 3 for errors that prevent a verdict and 2 for usage errors, so 1 always means an invalid instance or schema.
  • CLI: Errors print to stderr instead of stdout.
  • CLI: --version prints jsonschema-cli <VERSION> instead of Version: <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 dereference and jsonschema-cli canonicalize truncating the --output file when the write fails partway.
  • CLI: jsonschema-cli validate --help describing --offline in terms of --resource, which validate does not accept.
  • CLI: Error and warning messages suggesting jsonschema commands instead of the installed jsonschema-cli binary.
  • Canonicalizing several subschemas of one prepared document, where a $ref in a later output could point at another subschema.
  • canonicalize leaving unevaluatedProperties or unevaluatedItems beside anyOf or oneOf raw.
  • canonicalize giving a different form for a oneOf depending on the order of its branches.
  • canonicalize output changing when canonicalized again, for a not over a $ref it cannot fully negate.
  • canonicalize output changing when canonicalized again, for a oneOf whose branches reduce to the same $ref.
  • canonicalize leaving an anyOf over many overlapping objects raw.
  • canonicalize leaving dependencies or dependentRequired raw when their keys form a long chain or cycle.
  • canonicalize treating -0 as a value distinct from 0 under arbitrary-precision.
  • Regex matches the engine cannot finish, such as on reaching the backtrack limit, counted as non-matches, letting not or patternProperties accept invalid instances. #1715
  • canonicalize treating regex matches the engine cannot finish as non-matches.

Performance

  • canonicalize giving up sooner on an allOf over unions too wide to model.

[Ruby] Release 0.59.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 08:46
bcaa7bd

Fixed

  • Canonicalizing several subschemas of one prepared document, where a $ref in a later output could point at another subschema.
  • canonicalize leaving unevaluatedProperties or unevaluatedItems beside anyOf or oneOf raw.
  • canonicalize giving a different form for a oneOf depending on the order of its branches.
  • canonicalize output changing when canonicalized again, for a not over a $ref it cannot fully negate.
  • canonicalize output changing when canonicalized again, for a oneOf whose branches reduce to the same $ref.
  • canonicalize leaving an anyOf over many overlapping objects raw.
  • canonicalize leaving dependencies or dependentRequired raw 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 not or patternProperties accept invalid instances. #1715
  • canonicalize treating regex matches the engine cannot finish as non-matches.

Performance

  • canonicalize giving up sooner on an allOf over unions too wide to model.

[Python] Release 0.59.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 08:45
7745634

Changed

  • macOS arm64 wheel replaces the universal2 wheel.

Fixed

  • Canonicalizing several subschemas of one prepared document, where a $ref in a later output could point at another subschema.
  • canonicalize leaving unevaluatedProperties or unevaluatedItems beside anyOf or oneOf raw.
  • canonicalize giving a different form for a oneOf depending on the order of its branches.
  • canonicalize output changing when canonicalized again, for a not over a $ref it cannot fully negate.
  • canonicalize output changing when canonicalized again, for a oneOf whose branches reduce to the same $ref.
  • canonicalize leaving an anyOf over many overlapping objects raw.
  • canonicalize leaving dependencies or dependentRequired raw 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 not or patternProperties accept invalid instances. #1715
  • canonicalize treating regex matches the engine cannot finish as non-matches.

Performance

  • canonicalize giving up sooner on an allOf over unions too wide to model.

[Rust] Release 0.58.6

Choose a tag to compare

@github-actions github-actions released this 06 Oct 14:52
55ac166

Fixed

  • \s in pattern missing most Unicode space separators and U+2028.
  • ECMA regex character class literals being interpreted as Rust set operators.