-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate TS enum and z.nativeEnum openapi zod client #224
Comments
palaniichukdmytro
changed the title
Generate TS enum and union wtih openapi zod client
Generate TS enum and z.nativeEnum openapi zod client
Sep 7, 2023
I am thinking it might be helpful to add flag like
smth like this
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think it's common issue for generate type from open api spec.
I am using with zodios https://github.com/astahmer/openapi-zod-client/ openapi-zod-client. But did not found any possible solution to generate enum , instead I see that only union types is possible . Any idea to generate TS enum to use this enum in a code durin compile time .
Example schema json
By default it's generate a union with type flag enabled or via handlebars templates you can do yourself. But it is not possible to generate TS enum or z.nativeEnums
Output:
Exacted/Desire output
The text was updated successfully, but these errors were encountered: