(schema: T, processors: Record<string, Processor> = {})
| 599 | */ |
| 600 | export const createToJSONSchemaMethod = |
| 601 | <T extends schemas.$ZodType>(schema: T, processors: Record<string, Processor> = {}) => |
| 602 | (params?: ToJSONSchemaParams): ZodStandardJSONSchemaPayload<T> => { |
| 603 | const ctx = initializeContext({ ...params, processors }); |
| 604 | process(schema, ctx); |
| 605 | extractDefs(ctx, schema); |
| 606 | return finalize(ctx, schema); |
| 607 | }; |
| 608 | |
| 609 | /** |
| 610 | * Creates a toJSONSchema method for a schema instance. |
no test coverage detected