Normalise any supported schema input — Zod 4 schema, plain JSON
Schema (any draft), Swagger 2.0, OpenAPI 3.0 or 3.1 document — into
a canonical Draft 2020-12 NormalisedSchema the walker can
consume.
Dispatches on detectSchemaKind, applies the appropriate
version normaliser, and returns the JSON Schema alongside the
original Zod schema (for validation) and the resolved root document
(for cross-document $ref resolution). Throws
SchemaNormalisationError for unsupported inputs (Zod 3, valibot,
arktype, codec or other unrepresentable Zod types).
Normalise any supported schema input — Zod 4 schema, plain JSON Schema (any draft), Swagger 2.0, OpenAPI 3.0 or 3.1 document — into a canonical Draft 2020-12 NormalisedSchema the walker can consume.
Dispatches on detectSchemaKind, applies the appropriate version normaliser, and returns the JSON Schema alongside the original Zod schema (for validation) and the resolved root document (for cross-document
$refresolution). ThrowsSchemaNormalisationErrorfor unsupported inputs (Zod 3, valibot, arktype, codec or other unrepresentable Zod types).