Skip to content

v2.2.0

Latest

Choose a tag to compare

@JoshuaHarris391 JoshuaHarris391 released this 12 Aug 05:02

Fixes

  • Resolve $ref entries against the bundle file named in the reference (c4dd25a). Previously every file-qualified ref was looked up in a single reference document, so:
    • node-level refs into _terms.yaml (the shape the official Gen3 dictionary uses) raised KeyError and the node was silently dropped from the resolved schema — its data was never validated;
    • keys defined in both _terms.yaml and _definitions.yaml (e.g. UUID) silently resolved to the wrong document's content;
    • bare #/x refs resolved against the call root instead of the file they appear in.
  • Add memoization, circular-reference detection (CircularRefError instead of RecursionError), and RFC 6901 ~0/~1 pointer unescaping (c4dd25a).

Behaviour changes (read before upgrading)

  • Unresolvable structural refs now fail loud. resolve_schema() raises a typed SchemaResolutionError naming the ref, its source file, and the missing part. Pipelines that previously "worked" may now fail — that failure was previously invisible non-validation of the dropped node. resolve_all_references(strict=False) restores the legacy log-and-drop behaviour.
  • Dangling refs inside documentation-only term/terms blocks are tolerated with a warning (the official Gen3 develop dictionary ships several, e.g. _terms.yaml#/file_format). The manual strip-the-terms workaround is no longer needed: the unstripped official dictionary now resolves end to end (verified against 216 _terms.yaml refs).
  • Collision keys now resolve to the correct document, so resolved content may legitimately differ from 2.1.0 output where the old behaviour was wrong.
  • resolve_references(schema, reference): reference is now an optional fallback for files absent from the bundle rather than the target of every file-qualified ref. Standalone calls without a loaded bundle behave as before.

New public API

  • Exceptions: SchemaResolutionError, RefResolutionError, CircularRefError
  • resolve_all_references(strict: bool = True)

Full Changelog: v2.1.0...v2.2.0