Skip to content

Releases: asteasolutions/zod-to-openapi

v7.2.0

04 Oct 13:44
Compare
Choose a tag to compare

What's Changed

  • #256 added more string formats:
    • .emoji()
    • .cuid()
    • .cuid2()
    • .ulid()
    • .ip()

Full Changelog: v7.1.2...v7.2.0

v7.1.2

24 Sep 15:05
Compare
Choose a tag to compare

What's Changed

  • Documentation: update to include information about strict usage on an object (diff)
  • Bump rollup from 4.13.2 to 4.22.4 (diff)

Full Changelog: v7.1.1...v7.1.2

v7.1.1

18 Jun 08:36
Compare
Choose a tag to compare

What's Changed

  • Bump braces from 3.0.2 to 3.0.3 by Dependabot #241

Full Changelog: v7.1.0...v7.1.1

v7.1.0

17 Jun 14:49
Compare
Choose a tag to compare

What's Changed

  • allow nested effects on parameters (#238 )

Full Changelog: v7.0.0...v7.1.0

v7.0.0

05 Apr 10:15
Compare
Choose a tag to compare

What's Changed

  • Added ESM modules export alongside the already present CJS (#219)
  • Added support for .refine() and .transform on ZodObjects in request query/params/headers/cookies (#198)

BREAKING CHANGES ⚠️

❗ None of the changes that we've made are breaking in terms of code integration but their behavior (result) is changed:

Handle zod tuples with prefixItems for OpenAPI v3.1.0 (#221 )

As of OpenAPI v3.1.0 there is a better representation of tuples - ordered items with the use of the prefixItems keyword. See more here

BigInt is now transformed as type string

z.bigint() // this is now transformed to `{ type: 'string', pattern: "^\d+$' }` instead of an `'integer'` type.

A BigInt can represent a number with a arbitrary size and that also means numbers that do not fall in the int64 format. As such for a library based on the JS world it is safer to represent a z.bigint() instance as a string containing only digits. In a real life scenario a BigInt instance can only be created from whatever was passed through HTTPS - and that can be both number and string as a basis.

Along with that the support for the minimum and maximum values have been removed.

Full Changelog: v6.4.0...v7.0.0

v6.4.0

01 Mar 08:41
Compare
Choose a tag to compare

What's Changed

  • make examples use input type instead of output (same as what we sue to generate in the docs) (#189)
  • add autocompletion for common media types
  • handle enums as keys for zod records (#211)

Full Changelog: v6.3.1...v6.4.0

v6.3.1

02 Jan 15:21
Compare
Choose a tag to compare

What's Changed

  • fixed deepPartial modifier preserving refId (#200 )

Full Changelog: v6.3.0...v6.3.1

v6.3.0

16 Nov 15:57
Compare
Choose a tag to compare

What's Changed

  • Bump @babel/traverse from 7.20.12 to 7.23.2
  • #188 - do not label default schemas as required

Full Changelog: v6.2.0...v6.3.0

v6.2.0

17 Oct 13:42
Compare
Choose a tag to compare

What's Changed

  • #176 added support for z.bigint
  • #177 fix .describe for paramters not putting the description in the correct place

Full Changelog: v6.1.0...v6.2.0

v6.1.0

03 Oct 11:18
Compare
Choose a tag to compare

What's Changed

  • #173 Added support for ZodReadonly

Full Changelog: v6.0.0...v6.1.0