Skip to content

v3.3.0

Compare
Choose a tag to compare
@AGalabov AGalabov released this 05 Dec 21:22
· 237 commits to master since this release

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