Hey there, while trying out the recent standard schema implementation across multiple providers for formwerkjs/formwerk#238 I came across this issue.
When trying to get the input JSON schema for a given Zod mini schema with objects, it throws with the following error:
Error: Uncaught Error: [toJSONSchema]: Non-representable type encountered: object
Here is a small snippet to reproduce:
const zodJson = z.toJSONSchema(z
.object({
firstName: z.string(),
lastName: z.string(),
}))["~standard"]["jsonSchema"].input({ target: "draft-07" })
is there a plan to support object representations and probably other APIs?
Hey there, while trying out the recent standard schema implementation across multiple providers for formwerkjs/formwerk#238 I came across this issue.
When trying to get the input JSON schema for a given Zod mini schema with objects, it throws with the following error:
Here is a small snippet to reproduce:
is there a plan to support object representations and probably other APIs?