Open micaelmalta opened 2 years ago
The problem is that BC change regarding exclusiveMinimum/exclusiveMaximum was introduced in OpenAPI 3.1
https://github.com/OAI/OpenAPI-Specification/releases/tag/3.1.0-rc0
exclusiveMaximum and exclusiveMinimum cannot accept boolean values (following JSON Schema).
https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0
# OpenAPI v3.0
minimum: 7
exclusiveMinimum: true
# OpenAPI v3.1
exclusiveMinimum: 7
While the original example lacked the necessary (for OAS3.0) minimum
and maximum
values, I can confirm that the problem persists even with these values.
Context
JSON spec not respected for exclusiveMinimum and exclusiveMaximum
On Json API spec (https://json-schema.org/draft/2020-12/json-schema-validation.html#name-validation-keywords-for-num) , it says
How to reproduce
Current Response
Age is either negative or not in the range
Expected Response
Only positive values in the range 1 < value < 100
Environment
prism == 4.10.1 node == v17.7.2