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

    Function toDoc

    • Coerce an unknown value to a record, returning undefined when the value is not a plain object. Callers MUST handle the undefined case explicitly — typically by rendering a "doc not an object" diagnostic and short-circuiting, never by silently substituting {}.

      A previous implementation fell back to {} for non-objects, which masked configuration mistakes (passing a string, null, an array, or undefined as the OpenAPI document) as an empty document with no operations.

      Parameters

      • value: unknown

      Returns Record<string, unknown> | undefined