Closed arjunyel closed 4 months ago
I tried to fix this but couldn't figure it out in the time I had, I made a failing test for this: #242
it('supports default of 0', () => { expectSchema( [z.object({ test: z.number().positive().default(0) }).openapi('Object')], { Object: { type: 'object', properties: { test: { type: 'number', default: 0, exclusiveMinimum: true, minimum: 0, }, }, }, } ); });
- Expected - 0 + Received + 3 @@ -6,8 +6,11 @@ "exclusiveMinimum": true, "minimum": 0, "type": "number", }, }, + "required": Array [ + "test", + ], "type": "object", }, }
I tried to fix this but couldn't figure it out in the time I had, I made a failing test for this: #242