Skip to content

Releases: samchungy/zod-openapi

v2.12.0

08 Jan 00:04
cc1d088
Compare
Choose a tag to compare

What's Changed

New Features 🎉

Other Changes

New Contributors

Full Changelog: v2.11.0...v2.12.0

v2.11.0

09 Nov 04:14
7edaf80
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • Fix Nullable Behaviour by @samchungy in #187

    .nullable() now renders differently for OpenAPI < 3.1.0

    Previously a registered schema which was made nullable would render as:

    {
      oneOf: [
        { $ref: '#/components/schemas/a' },
        { nullable: true }
      ]
    }

    will now be rendered as:

    {
      allOf: [
        { $ref: '#/components/schemas/a' }
      ],
      nullable: true
    }

    Similarly with nullable unions

    {
      anyOf: [
        { $ref: '#/components/schemas/a' },
        { $ref: '#/components/schemas/b' },
        { nullable: true }
      ]
    }

    Will now be rendered as:

    {
      anyOf: [
        { $ref: '#/components/schemas/a' },
        { $ref: '#/components/schemas/b' }
      ],
      nullable: true
    }

Full Changelog: v2.10.0...v2.11.0

v2.10.0

03 Nov 08:20
b811e96
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • Add unionOneOf by @samchungy in #184

    You can now use unionOneOf to override the output of a ZodUnion to be a oneOf schema instead of allOf (default). Previously rendering an oneOf schema was only possible with a ZodDiscriminatedUnion.

  • Bundle Package with esbuild by @samchungy in #178

    This should result in no changes to the public API, however, if you were previously reaching into the package paths internally you will now see an error.

Full Changelog: v2.9.1...v2.10.0

v2.10.0-beta.1

21 Oct 04:50
cdee275
Compare
Choose a tag to compare
v2.10.0-beta.1 Pre-release
Pre-release

What's Changed

New Features 🎉

  • Bundle Package with esbuild by @samchungy in #178

    This should result in no changes to the public API, however, if you were previously reaching into the internal files you will now see an error.

Full Changelog: v2.9.1...v2.10.0-beta.1

v2.9.1

16 Oct 13:38
3531b53
Compare
Choose a tag to compare

What's Changed

Other Changes

  • fix: default should be nonoptional in output state by @tomwwright in #175

    When .default() is used on a ZodObject property field in a response schema, it is now correctly reflected as a required field.

New Contributors

Full Changelog: v2.9.0...v2.9.1

v2.9.0

24 Aug 06:13
3525d79
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • Handle .startsWith(), .endsWith(), .includes() and multiple string patterns by @samchungy in #164

Other Changes

Full Changelog: v2.8.0...v2.9.0

v2.9.0-beta.0

24 Aug 05:43
b10481c
Compare
Choose a tag to compare
v2.9.0-beta.0 Pre-release
Pre-release

What's Changed

New Features 🎉

  • Handle .startsWith(), .endsWith(), .includes() and multiple string patterns by @samchungy in #164

Other Changes

Full Changelog: v2.8.0...v2.9.0-beta.0

v2.8.0

15 Aug 00:14
1b52ce5
Compare
Choose a tag to compare

What's Changed

New Features 🎉

Other Changes

Full Changelog: v2.7.4...v2.8.0

v2.7.4

18 Jul 00:28
6657e9c
Compare
Choose a tag to compare

What's Changed

Other Changes

Full Changelog: v2.7.3...v2.7.4

v2.7.3

15 Jul 10:28
8210967
Compare
Choose a tag to compare

What's Changed

Other Changes

  • Fix effectType regression error by @samchungy in #147

    Fixes a bug introduced in 2.7.2 where ZodEffects would throw errors around effectType even if they were not used in components.

Full Changelog: v2.7.2...v2.7.3