openapi-ts icon indicating copy to clipboard operation
openapi-ts copied to clipboard

[Zod] Dates generated as z.string().date() instead of z.date()

Open petercinibulk opened this issue 7 months ago • 4 comments

Description

I am using the Zod and Date transformer but I noticed the Zod creates dates as z.string().date() instead of z.date() which messes with the Date transformer. Is there any way to configure Zod to know that there is a date transformer and so that is should use z.date()

Reproducible example or configuration

https://stackblitz.com/edit/hey-api-client-fetch-example

Add "zod" to the above example

OpenAPI specification (optional)

No response

System information (optional)

No response

petercinibulk avatar Apr 02 '25 16:04 petercinibulk