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

    Function resolveRef

    • Resolve a $ref in a schema against a root document. Returns the original schema if no $ref is present. Returns an unknown-schema placeholder on cycle or depth exceeded.

      The depth bound is derived from the number of distinct $ref strings in the root document — a chain longer than that count is necessarily cyclic. When maxDepth is not provided, a reasonable default is used.

      Parameters

      • schema: Record<string, unknown>
      • rootDocument: Record<string, unknown>
      • visited: Set<string>
      • Optionaldiagnostics: DiagnosticsOptions
      • OptionalmaxDepth: number
      • OptionalexternalResolver: ExternalResolver

      Returns Record<string, unknown>