Skip to main content

Function: toPortableJsonSchema()

toPortableJsonSchema(jsonSchema, target): Record<string, unknown>

Defined in: packages/workflow-engine/src/ai/schema-portability.ts:293

A JSON Schema (as z.toJSONSchema emits it) rewritten for target. Never mutates its input. Throws UnportableSchemaError for the openai target when the schema uses a keyword strict mode cannot express.

Parameters​

jsonSchema​

unknown

target​

SchemaTarget

Returns​

Record<string, unknown>