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.
Coerce an unknown value to a record, returning
undefinedwhen the value is not a plain object. Callers MUST handle theundefinedcase 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, orundefinedas the OpenAPI document) as an empty document with no operations.