Any Recommended Translator from OpenAPI Sepcification to Zod? #2894
Unanswered
razb-viola
asked this question in
Q&A
Replies: 2 comments
-
|
See #5280 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
You can use this: https://openapi-zod-client.vercel.app |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have this:
And I want the translator to convert this to this:
I have tried
kubbhowever I only got a result offirstName: z.string()without the min and max (which are critical in validations, of course).Now obviously I can replicate the entire constraints by myself, but it will be harder to maintain.
(btw, as a plan B I tried this:
const schema = z.object<Foo>(...)but it doesn't work.)Beta Was this translation helpful? Give feedback.
All reactions