(prop: any, key: string)
| 116 | |
| 117 | // @eslint-disable-next-line |
| 118 | const buildZodProp = (prop: any, key: string): ZodTypeAny => { |
| 119 | if (prop.type === "string") { |
| 120 | return z.string(); |
| 121 | } else if (prop.type === "number") { |
| 122 | return z.number(); |
| 123 | } else if (prop.type === "boolean") { |
| 124 | return z.boolean(); |
| 125 | } else if (prop.type === "object") { |
| 126 | return z.object(buildZodObject(prop)); |
| 127 | } else if (prop.type === "array") { |
| 128 | return z.array(buildZodProp(prop.items, key)); |
| 129 | } else { |
| 130 | return z.any(); |
| 131 | } |
| 132 | }; |
no test coverage detected