Create runtime validation schemas from sample payloads
import { z } from 'zod';
export const rootSchema = z.object({
"user": z.object({
"id": z.number().int(),
"email": z.string()
}),
"tags": z.array(z.string()),
"enabled": z.boolean(),
"metadata": z.null()
});
export type Root = z.infer<typeof rootSchema>;