Skip to content

Releases: asteasolutions/zod-to-openapi

v4.4.0

28 Feb 08:05
Compare
Choose a tag to compare

What's Changed

  • #94 Added support for zod's .describe method

Full Changelog: v4.3.0...v4.4.0

v4.3.0

20 Feb 11:05
Compare
Choose a tag to compare

What's Changed

  • Added discriminator mapping for objects using enums as discriminator

Full Changelog: v4.2.0...v4.3.0

v4.2.0

13 Feb 18:55
Compare
Choose a tag to compare

What's Changed

  • 'ZodNativeEnum' would be generated as type: 'integer' instead of type: 'number'

Full Changelog: v4.1.0...v4.2.0

v4.1.0

10 Jan 10:32
Compare
Choose a tag to compare

What's Changed

  • updated all jest related dependencies in order to update json5 and thus resolving a security vulnerability
  • #80 allow zod objects to be used to define route headers

Full Changelog: v4.0.0...v4.1.0

v4.0.0

20 Dec 12:14
Compare
Choose a tag to compare

What's Changed

Zod introduced a breaking change to one of its models in its latest version. See this comment

Because of that we are updating our peer dependency to ^3.20.2.

Full Changelog: v3.4.0...v4.0.0

v3.4.0

15 Dec 14:19
Compare
Choose a tag to compare

What's Changed

  • Added ZodString Datetime support

Full Changelog: v3.3.0...v3.4.0

v3.3.0

05 Dec 21:22
Compare
Choose a tag to compare

What's Changed

  • Fixed exclusive minimum and maximum checks for numbers

Examples

The following schema z.number().gt(0) would have the following result

{ type: 'number', minimum: 0, exclusiveMinimum: true } // for OpenApi 3.0.0
{ type: 'number', exclusiveMinimum: 0 } // for OpenApi 3.1.0 and higher

Similarly, for the schema z.number().lt(10) the result would be

{ type: 'number', maximum: 10, exclusiveMaximum: true } // for OpenApi 3.0.0
{ type: 'number', exclusiveMaximum: 10 } // for OpenApi 3.1.0 and higher

Full Changelog: v3.2.0...v3.3.0

v3.2.0

04 Dec 08:22
Compare
Choose a tag to compare

What's Changed

  • added support for branded types [closes #72]

Full Changelog: v3.1.0...v3.2.0

v3.1.0

22 Nov 08:59
Compare
Choose a tag to compare

What's Changed

  • Added additionalProperties: false to strict objects. Removed additionalProperties: true from regular objects since this is the OpenApi default
  • Fix referencing schema with unrecognized type

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

v3.0.1

21 Nov 09:51
Compare
Choose a tag to compare

What's Changed

  • Fixed a Typescript 4.9
  • Fixed Route types to support strict objects

Full Changelog: v3.0.0...v3.0.1