schema-components - v3.7.0
    Preparing search index...

    Interface NodeContext

    Per-node context threaded through deepNormaliseWithContext.

    Carries the diagnostics sink and the JSON Pointer to the current node so per-node transforms can emit pointer-accurate diagnostics when they translate or reject legacy constructs.

    documentHasDynamicAnchor is set once at the entry point by scanning the input for any $dynamicAnchor/$recursiveAnchor keyword. Per- node transforms read it to decide whether a $dynamicRef/$recursiveRef rewrite needs a dynamic-ref-degraded diagnostic — a ref pointing at an anchor in the document body cannot be statically resolved without losing dynamic-scope semantics, while a document with no dynamic anchors at all has no semantics to lose.

    documentHasRecursiveAnchor is the same idea for Draft 2019-09's $recursiveAnchor keyword.

    declaredDraft carries the draft the normaliser is operating under (when known) so per-node transforms can emit keyword-out-of-draft diagnostics for keywords introduced in a later draft.

    interface NodeContext {
        diagnostics: DiagnosticsOptions | undefined;
        pointer: string;
        documentHasDynamicAnchor: boolean;
        documentHasRecursiveAnchor: boolean;
        declaredDraft: JsonSchemaDraft | undefined;
    }
    Index

    Properties

    diagnostics: DiagnosticsOptions | undefined
    pointer: string
    documentHasDynamicAnchor: boolean
    documentHasRecursiveAnchor: boolean
    declaredDraft: JsonSchemaDraft | undefined