[Rust] Release 0.51.0
·
292 commits
to master
since this release
Added
ValidationOptions::with_vocabularyand thevocabulariesattribute onjsonschema::validator, declaring support for a vocabulary this crate does not implement.- The
--vocabularyflag ofjsonschema validate.
Changed
Vocabularygained theFormatAssertionvariant, which its Draft 2020-12 URI parses to instead ofVocabulary::Custom, and is markednon_exhaustive.
Fixed
- The
uniqueItemslength ceiling not reading anitemsorcontainsschema written as a$ref. - The Draft 2020-12 Format-Assertion vocabulary read as an annotation, so a meta-schema requiring it accepted values its
formatrejects. - An unrecognized
formataccepted 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
trueread as an annotation, so a meta-schema requiring it accepted values itsformatrejects. - The bundled
https://json-schema.org/draft/2020-12/meta/format-assertionmeta-schema not declaring its vocabulary, so a schema written against it annotatedformatinstead of asserting it. - A meta-schema without
$idkeeping its$vocabularyunread, so a schema written against it got every Draft 2020-12 vocabulary. - A schema naming a bundled vocabulary meta-schema as its
$schemarejected as an unknown meta-schema (it should build). - The
regexformat reading the Rust regex dialect (it should read the ECMA-262 dialect in Unicode mode). - The
uri-templateformat rejecting an apostrophe in a literal (it should accept it, per RFC 6570 errata 6937). - The
durationformat accepting weeks combined with a time part, such asP1WT1H(it should reject it). - Stack overflow compiling
unevaluatedPropertiesorunevaluatedItemsbeside a$refthat cycles back to the node, written as#, through its$id, or through a chain of definitions.
Performance
- Building
unevaluatedPropertiesorunevaluatedItemsover a deepallOfor$refchain costs its depth instead of its square.