A11 TypeScript API - v0.2.1
    Preparing search index...

    Function organiseAndDeduplicateJsonschema

    • Hoist every $defs entry to the schema root and deduplicate by content.

      Walks the tree once, resolves each $ref against the nearest enclosing $defs scope, and re-homes the result under a single root-level $defs, replacing every duplicate occurrence with a $ref to one canonical copy.

      Parameters

      • schema: Record<string, JsonValue>

      Returns Record<string, JsonValue>