Appearance
Interface: RegistryToJSONSchemaParams
Defined in: node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.cts:49
Parameters for the toJSONSchema function when passing a registry.
Extends
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
metadata? | $ZodRegistry<Record<string, any>, $ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>> | A registry used to look up metadata for each schema. Any schema with an id property will be extracted as a $def. Default globalRegistry | ToJSONSchemaParams.metadata | node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.cts:11 |
target? | | "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | { } & string | The JSON Schema version to target. - "draft-2020-12" — Default. JSON Schema Draft 2020-12 - "draft-07" — JSON Schema Draft 7 - "draft-04" — JSON Schema Draft 4 - "openapi-3.0" — OpenAPI 3.0 Schema Object | ToJSONSchemaParams.target | node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.cts:17 |
unrepresentable? | "any" | "throw" | How to handle unrepresentable types. - "throw" — Default. Unrepresentable types throw an error - "any" — Unrepresentable types become {} | ToJSONSchemaParams.unrepresentable | node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.cts:21 |
override? | (ctx: { zodSchema: $ZodTypes; jsonSchema: JSONSchema; path: (string | number)[]; }) => void | Arbitrary custom logic that can be used to modify the generated JSON Schema. | ToJSONSchemaParams.override | node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.cts:23 |
io? | "input" | "output" | Whether to extract the "input" or "output" type. Relevant to transforms, defaults, coerced primitives, etc. - "output" — Default. Convert the output schema. - "input" — Convert the input schema. | ToJSONSchemaParams.io | node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.cts:31 |