Skip to content

[Rust] Release 0.51.0

Choose a tag to compare

@github-actions github-actions released this 23 Aug 23:29
· 292 commits to master since this release
b7fd606

Added

  • ValidationOptions::with_vocabulary and the vocabularies attribute on jsonschema::validator, declaring support for a vocabulary this crate does not implement.
  • The --vocabulary flag of jsonschema validate.

Changed

  • Vocabulary gained the FormatAssertion variant, which its Draft 2020-12 URI parses to instead of Vocabulary::Custom, and is marked non_exhaustive.

Fixed

  • The uniqueItems length ceiling not reading an items or contains schema written as a $ref.
  • The Draft 2020-12 Format-Assertion vocabulary read as an annotation, so a meta-schema requiring it accepted values its format rejects.
  • An unrecognized format accepted under a meta-schema requiring the Format-Assertion vocabulary (it should be rejected).
  • A meta-schema requiring a vocabulary this crate does not implement accepted (it should be rejected).
  • The Draft 2019-09 Format vocabulary declared true read as an annotation, so a meta-schema requiring it accepted values its format rejects.
  • The bundled https://json-schema.org/draft/2020-12/meta/format-assertion meta-schema not declaring its vocabulary, so a schema written against it annotated format instead of asserting it.
  • A meta-schema without $id keeping its $vocabulary unread, so a schema written against it got every Draft 2020-12 vocabulary.
  • A schema naming a bundled vocabulary meta-schema as its $schema rejected as an unknown meta-schema (it should build).
  • The regex format reading the Rust regex dialect (it should read the ECMA-262 dialect in Unicode mode).
  • The uri-template format rejecting an apostrophe in a literal (it should accept it, per RFC 6570 errata 6937).
  • The duration format accepting weeks combined with a time part, such as P1WT1H (it should reject it).
  • Stack overflow compiling unevaluatedProperties or unevaluatedItems beside a $ref that cycles back to the node, written as #, through its $id, or through a chain of definitions.

Performance

  • Building unevaluatedProperties or unevaluatedItems over a deep allOf or $ref chain costs its depth instead of its square.