Fixes
- Resolve
$refentries 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) raisedKeyErrorand the node was silently dropped from the resolved schema — its data was never validated; - keys defined in both
_terms.yamland_definitions.yaml(e.g.UUID) silently resolved to the wrong document's content; - bare
#/xrefs resolved against the call root instead of the file they appear in.
- node-level refs into
- Add memoization, circular-reference detection (
CircularRefErrorinstead ofRecursionError), and RFC 6901~0/~1pointer unescaping (c4dd25a).
Behaviour changes (read before upgrading)
- Unresolvable structural refs now fail loud.
resolve_schema()raises a typedSchemaResolutionErrornaming 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/termsblocks 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.yamlrefs). - 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):referenceis 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