Open jgravois opened 1 year ago
OpenAPI 3.1 follows JSON Schema 2020-12, which states that exclusiveMinimum and exclusiveMaximum MUST be numbers.
Thus, the behaviour here is correct.
https://json-schema.org/draft/2020-12/json-schema-validation#name-exclusivemaximum
The issue here is that this library does not explicitly support OpenAPI 3.1, yet it outputs a v3.1 schema and typings, which are not backwards compatible.
in the same vein as #159
hi there, thanks for maintaining this library! 👋 i just encountered an external validation tool that expects
exclusiveMinimum
to be a boolean instead of a number.i'm having a little trouble following the thread, but i'm under the impression that the spec for this changed between 3.0.1 and 3.1.
related: https://github.com/tiangolo/fastapi/issues/240
https://github.com/anatine/zod-plugins/blob/cbea74de929355ccfcf11264b27627197eb94141/packages/zod-openapi/src/lib/zod-openapi.ts#L155-L160
i'm not blocked by this. but i assumed logging would be helpful to resolve the issue eventually.