Description of the problem/issue
PR #5162 introduced support for @Positive and @Negative validation annotations.
Currently these are both resolved into the same
"schema": {
"type": "integer",
"format": "int32",
"exclusiveMinimum": true,
"minimum": 0
}
for both OAS 3.0 and OAS 3.1.
I would expect the OAS 3.1 version to be
"schema": {
"type": "integer",
"format": "int32",
"exclusiveMinimum": 0
}
since the json-schema that was introduced with 3.1 supports a numeric representation of exclusiveMinimum/exclusiveMaximum. For example see https://learn.openapis.org/upgrading/v3.0-to-v3.1.html#update-exclusiveminimum-and-exclusivemaximum.
Affected Version
2.2.49
Earliest version the bug appears in (if known):
2.2.49
Steps to Reproduce
Use @Positive or @Negative in an OAS 3.1 context.
Expected Behavior
The schema should be
"schema": {
"type": "integer",
"format": "int32",
"exclusiveMinimum": 0
}
Actual Behavior
The schema is
"schema": {
"type": "integer",
"format": "int32",
"exclusiveMinimum": true,
"minimum": 0
}
Logs / Stack Traces
Additional Context
Checklist
Description of the problem/issue
PR #5162 introduced support for
@Positiveand@Negativevalidation annotations.Currently these are both resolved into the same
for both OAS 3.0 and OAS 3.1.
I would expect the OAS 3.1 version to be
since the json-schema that was introduced with 3.1 supports a numeric representation of
exclusiveMinimum/exclusiveMaximum. For example see https://learn.openapis.org/upgrading/v3.0-to-v3.1.html#update-exclusiveminimum-and-exclusivemaximum.Affected Version
2.2.49
Earliest version the bug appears in (if known):
2.2.49
Steps to Reproduce
Use
@Positiveor@Negativein an OAS 3.1 context.Expected Behavior
The schema should be
Actual Behavior
The schema is
Logs / Stack Traces
Additional Context
Checklist