Function: dereferenceSchema()
dereferenceSchema(
schema,spec):Record<string,unknown> |undefined
Defined in: schema.ts:105
Recursively inlines every $ref in a schema (including refs nested inside
properties, items, oneOf, anyOf, etc.), producing a self-contained
schema safe to hand to an MCP client or LLM provider as a tool definition —
provider tool schemas have no components section to resolve refs against.
Parameters
| Parameter | Type |
|---|---|
schema | Record<string, unknown> | undefined |
spec | OpenApiSpec |
Returns
Record<string, unknown> | undefined