v2.17.0
What's Changed
New Features 🎉
-
Add Auto-Extend Zod Import by @samchungy in #261
Previously, you needed to extend Zod by importing a function and running it against Zod which is rather clunky:
import { z } from 'zod'; import { extendZodWithOpenApi } from 'zod-openapi'; extendZodWithOpenApi(z); z.string().openapi({ description: 'hello world!', example: 'hello world' });
You can now replace it by importing the new subpath import:
import 'zod-openapi/extend'; import { z } from 'zod'; z.string().openapi({ description: 'hello world!', example: 'hello world' });
Full Changelog: v2.16.0...v2.17.0