v3.3.0
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