You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The correspondence fell apart. It got string and datetime correct, but the default value went sideways. It's as if it evaluated @default 0000-00-00 as an arithmetic expression, producing a Number.
Description
I have an OpenAPI spec where one schema object is declared as so:
The idea of this
default
value is that it's a string parseable as a Date, but produces a value we can readily detect as invalid.The generated code from
openapi-typescript
is:That's a good correspondence to the schema.
The output from
ts-to-zod
is:The correspondence fell apart. It got
string
anddatetime
correct, but thedefault
value went sideways. It's as if it evaluated@default 0000-00-00
as an arithmetic expression, producing a Number.@openapi-codegen/typescript
8.0.0
ts-to-zoc
3.4.1
20.10.0
Ubuntu 20.04
Reproduction
See above
Expected result
The text was updated successfully, but these errors were encountered: