v2.5.0
Warning
The allOf $ref wrapping introduced in v2.5.0 was based on a misdiagnosis and has been reverted in v2.6.1. Do not use the fix-refs command from this release. The real cause of missing descriptions in the data-dictionary viewer is description: null placeholders in _definitions.yaml — the null-description warning (kept in v2.6.1) diagnoses it.
Features
- Preserve
$refsibling annotations viaallOfwrapping and addfix-refscommand (1f805ad)
Gen3 resolves data dictionaries with JSON Schema draft-04 semantics, where any keyword sitting as a direct sibling of $ref is ignored during resolution. Properties written as {description: ..., $ref: ...} therefore lost their description/termDef/term in dictionaryutils, and the data-dictionary viewer showed "No Description". This release keeps those annotations by moving the $ref into an allOf list, with the annotations as siblings of allOf.
Details
- New
refsmodule — single source of truth for the transform. Idempotent; never touches bare refs, refs already insideallOf/anyOf/oneOf, theproperties: {$ref: ...}merge construct, or_definitions.yaml/_terms.yaml/_settings.yaml. - Generator fix —
format_datetimeno longer drops the property description when emitting the_definitions.yaml#/datetimeref; annotations are preserved besideallOf. - New CLI command —
gen3schemadev fix-refs -y <dir> [--dry-run]rewrites an existing dictionary in place (recursive) with a per-file, per-property report of what was wrapped and what was skipped and why. - Rule validator —
props_must_have_typenow recognises refs wrapped inallOf/anyOf/oneOf, so fixed properties are not flagged as missingtype/enum. Legacy top-level sibling refs still validate as before. - Shipped templates — sibling-
$refproperties inproject.yaml(id,programs) andprogram.yaml(id) rewritten to theallOfform.
Notes for downstream consumers
- Resolved-schema shape changes for wrapped properties: the referenced definition content now nests under
allOf[0]after resolution (gen3-validator), instead of being merged flat. - After updating a deployed dictionary, the compiled dictionary must be rebuilt and the portal cache refreshed before descriptions appear in the UI.
Full Changelog: v2.4.0...v2.5.0