Zod ​
WARNING
Zod plugin is in development. You can follow the updates and provide feedback on GitHub.
Zod is a TypeScript-first schema validation library with static type inference.
Features ​
- seamless integration with
@hey-api/openapi-ts
ecosystem - Zod schemas for requests, responses, and reusable components
Installation ​
WARNING
Zod plugin works only with the experimental parser which is currently an opt-in feature.
Ensure you have already configured @hey-api/openapi-ts
. Update your configuration to use the Zod plugin.
js
export default {
client: '@hey-api/client-fetch',
experimentalParser: true,
input: 'path/to/openapi.json',
output: 'src/client',
plugins: [
// ...other plugins
'zod',
],
};
You can now generate Zod artifacts. 🎉
Output ​
The Zod plugin will generate the following artifacts, depending on the input specification.
Schemas ​
More information will be provided as we finalize the plugin.
Examples ​
You can view live examples on StackBlitz.
Sponsoring ​
Love Hey API? Please consider becoming a sponsor.