Skip to content

v2.17.0

Compare
Choose a tag to compare
@samchungy samchungy released this 23 Apr 05:52
· 29 commits to master since this release
b0b0a90

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