Open RakeshPotnuru opened 1 month ago
Hi, nested object in input for GET method not working.
GET
Example:
getAll: protectedProcedure .meta({ openapi: { method: "GET", path: "/something/get-all", protect: true, }, }) .input( z.object({ pagination: z.object({ // <--- Error: Input parser key: "pagination" must be ZodString, ZodNumber, ZodBoolean, ZodBigInt or ZodDate page: z.number().int().positive().default(1), limit: z.number().int().positive().default(10), }), }), )
This is documented in the readme, but I agree it would be nice to try to have a mapping. These become query parameters, so you'll need to define a mapping to path.
Hi, nested object in input for
GET
method not working.Example: