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

    Function countDistinctRefs

    • Count all distinct $ref strings reachable from a root document. A chain longer than the number of distinct refs is necessarily cyclic. Returns at least 1 so that single-ref schemas have a usable bound.

      Parameters

      • root: Record<string, unknown>

      Returns number