[Rust] Release 0.50.0
·
42 commits
to master
since this release
Added
CanonicalSchema::unionandCanonicalSchema::subtract.CanonicalizationError::UnsupportedResult, reported where the canonical form does not support a set operation's result.OperandMismatch::DocumentRoots, reported where both operands read#and it names a different document on each side.- CLI:
jsonschema validate -i INSTANCEwithout aSCHEMAargument validates each instance against the schema named in its own$schemaproperty. #1470
Changed
CanonicalSchema::is_satisfiableis nowCanonicalSchema::satisfiability, answeringYes,No, orUnknown-Yeswherever a value can be exhibited, not only for the forms listing their members.CanonicalSchema::coversdecides through the difference as well:Nowhere the argument keeps values the receiver rejects,Yeswhere nothing is left over.CanonicalSchema::is_subset_ofis nowCanonicalSchema::covers, answeringYes,No, orUnknownfor whether the receiver admits every value the argument admits.CanonicalSchema::negatereturnsResultrather thanOption.CanonicalizationError::UnmodeledOperandis nowCanonicalizationError::UnsupportedOperand, and means only that an operand is aRawpass-through.- A conjunction over a
$reffolds through the body it names, so canonicalizing a document and combining its parts with the set operations reach one form; a document holding a reference cycle keeps the form it had.
Fixed
- Combining nodes of two different documents repointing a
$refto#at the combined result instead of the document it was written in, including one named by a definition the result keeps. - Intersecting a
$refwhose target istrueorfalse, which panicked. - A key constraint left un-narrowed once a run is out of intersections, which panicked on the next read of it.
CanonicalSchema::coversansweringUnknownfor a schema against itself, where that schema is a$ref.CanonicalSchema::unionkeeping a$refbeside the schema it names, where the other three operations read through it.CanonicalSchema::coversandCanonicalSchema::subtractcancelling two nodes written the same way whose#names a different document.- Two results accepting the same values comparing unequal over the part of their documents neither reads.
additionalPropertiesreaching a key the pattern map matches when a finite key constraint closes the map, which dropped values both operands accept.- A recursive definition stopping every other pointer in the document from being read through.
- One
$defsentry read past a wider schema written out at every use, rather than kept as the pointer it was. - Set operations rejecting one document canonicalized twice, and a pruned result rejected against the document it came from, where the maps resolve every shared reference the same way.
- Set operations comparing a
$refas a pointer instead of reading through it, so a schema written with a$refdid not cancel against the same schema written out. CanonicalSchema::subtractasking for a complement where the difference is one of the operands or empty, declining on schemas it can subtract.- Set operations keeping
$defsentries the result no longer references, which then showed up in the emitted schema. CanonicalSchema::uniondeclining over an approximated intersection, where the union itself is exact.- Resolving a reference against a base URI that carries a fragment, which happens when a Draft 4-7
$idcontains one. #1473 unevaluatedPropertiesandunevaluatedItemsignoring an$idon a subschema they walk through, so a relative$refinside it resolved against the enclosing resource.
Performance
- CLI: ~25% less CPU per run from compile-time meta-schema validators.