Skip to content

Releases: samchungy/zod-openapi

v3.1.1

08 Oct 23:29
74494d6
Compare
Choose a tag to compare

What's Changed

Other Changes

  • Fix createParamOrRef by @samchungy in #336

    This fixes a breaking change unintentionally introduced in the previous release.

Full Changelog: v3.1.0...v3.1.1

v3.1.0

08 Oct 03:48
77deb27
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • CreateDocumentOptions

    This adds a couple global options to allow you to change how your OpenAPI documentation is rendered. Previously you needed to apply these on a field level to every type. Check the README for more details.

  • Introduce createSchema by @samchungy in #325

    This enables users to be able to create individual schemas without needing to scaffold the whole createDocument function.

New Contributors

Full Changelog: v3.0.1...v3.1.0

v3.0.1

20 Sep 03:25
1fab04f
Compare
Choose a tag to compare

What's Changed

Breaking Changes 🛠

  • Move api to zod-openapi/api by @samchungy in #316

    This moves some internal functions previously exported via the api namespace to a zod-openapi/api subpath import.

  • Require Node 18 by @samchungy in #317

New Contributors

  • @tmcw made their first contribution in #291

Full Changelog: v2.19.0...v3.0.1

v3.0.0-beta.0

20 Sep 03:17
1ae6a9f
Compare
Choose a tag to compare
v3.0.0-beta.0 Pre-release
Pre-release

What's Changed

Breaking Changes 🛠

Other Changes

New Contributors

  • @tmcw made their first contribution in #291

Full Changelog: v2.19.0...v3.0.0

v2.19.0

19 Jun 05:21
046f4aa
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • This release addresses ESM/CJS and subpath type issues for this library but as a side-effect also contains some minor BREAKING CHANGES to the types. If you were previously importing types directly from a subpath, you will now need to import them directly from the lib. There should be effect on the runtime functionality of the library.

    - import { ServerObject } from 'zod-openapi/lib-types/openapi3-ts/dist/oas31';
    - declare const server: ServerObject;
    
    + import { oas31 } from 'zod-openapi 
    + declare const server: oas31.ServerObject;

    This change also omits some extraneous class and function types from the openapi3-ts types that this library re-exports.

Other Changes

Full Changelog: v2.18.0...v2.19.0

v2.19.0-beta.1

19 Jun 02:58
de5a36f
Compare
Choose a tag to compare
v2.19.0-beta.1 Pre-release
Pre-release

What's Changed

Other Changes

Full Changelog: v2.18.0...v2.19.0-beta.1

v2.19.0-beta.0

18 Jun 14:40
e6a539e
Compare
Choose a tag to compare
v2.19.0-beta.0 Pre-release
Pre-release

What's Changed

Other Changes

Full Changelog: v2.18.0...v2.19.0-beta.0

v2.18.0

31 May 13:17
add5e72
Compare
Choose a tag to compare

What's Changed

New Features 🎉

Other Changes

Full Changelog: v2.17.0...v2.18.0

v2.18.0-beta.0

31 May 13:08
d679c6d
Compare
Choose a tag to compare
v2.18.0-beta.0 Pre-release
Pre-release

What's Changed

New Features 🎉

Other Changes

Full Changelog: v2.17.0...v2.18.0-beta.0

v2.17.0

23 Apr 05:52
b0b0a90
Compare
Choose a tag to compare

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