Tell Zod to allow any fields in JSON (while in Development)?

I have a very large JS object I want to pass to trpc, through zod. Right now I just want to play around with the object a bit, before creating my zod schema. Is there a way to allow anything to be passed into zod (at least just in dev mode)? Or to just disable zod for the time being?
z.object({
id: z.string(),
data: z.object( // here i want to tell zod to allow any values)
})
z.object({
id: z.string(),
data: z.object( // here i want to tell zod to allow any values)
})
I know this is not the idea of zod at all, but would love to not have to build this crazy large schema right now only to throw it away later, because it's not really a finished/working thing right now.
2 Replies
Neto
Neto3y ago
plyglt
plygltOP3y ago
thanks a looot again! I'm not entirely sure how to turn them into z.() objects though
Want results from more Discord servers?
Add your server