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
I have an OpenAPI spec where many of the object properties have default: null, such as these:
programLongName:
type: stringdescription: Long name of program for human readability.example: Residential Time of Use-Anullable: truedefault: nullretailerName:
type: stringdescription: Short name of energy retailer providing the program.example: ACMEnullable: truedefault: null
In the generated TypeScript type, they look like:
/** * Long name of program for human readability. * * @example Residential Time of Use-A * @default null */programLongName?: string|null;/** * Short name of energy retailer providing the program. * * @example ACME * @default null */retailerName?: string|null;
Then in the Zod code generated by ts-to-zod they look like:
Description
I have an OpenAPI spec where many of the object properties have
default: null
, such as these:In the generated TypeScript type, they look like:
Then in the Zod code generated by ts-to-zod they look like:
The default should be
null
not"null"
.openapi-codegen
8.0.0
ts-to-zod
3.4.1
20.10.0
Ubuntu 20.04
Reproduction
See above
Expected result
The text was updated successfully, but these errors were encountered: