fix: negative and positive validation annotations uses relevant OAS 3.1 syntax ( #5170)#5171
Conversation
0e9a53e to
50bf7d7
Compare
|
Thank you @Mattias-Sehlstedt for your commit on this issue!
I have added also tests to check the interactions between constraints. |
| @Test | ||
| public void testApplyDecimalMinConstraintV31Exclusive() { | ||
| Schema schema = new NumberSchema(); | ||
| schema.setSpecVersion(io.swagger.v3.oas.models.SpecVersion.V31); |
There was a problem hiding this comment.
io.swagger.v3.oas.models.SpecVersion.V31 could be imported
|
I can echo that this PR properly fixed the bug around both minimum and exclusiveMinimum being included the outputted spec that we were seeing on latest! Thank you for working on this! |
This reverts commit 3a53a5e.
97e8a85 to
6a0fdee
Compare
|
@Mattias-Sehlstedt thanks again for your time and engagement! We really appropriate your work! |
|
Thanks @daniel-kmiecik 🙏 Now I only have a single fix left before I would consider swagger-core (a) fully functional and operational (battle station). On the current version I have a lot of Int.MAX and Int.MIN leaking in my specification due to composed constraint annotations. I assume that few have been affected by this as of now, since most usage comes through springdoc and they are a bit behind with the versions. If my PR was to be reviewed then I could later make sure to bump springdoc all the way to latest and ensure that their next release will jump directly to that version, and that that will hopefully also make everyone be extremely happy with the current functionality. |
Pull Request
Thank you for contributing to swagger-core!
Please fill out the following information to help us review your PR efficiently.
Description
Fixes so that a
@Positiveand@Negativeutilizes the fact thatexclusiveMinimum/exclusiveMaximumis numeric for OAS 3.1.Fixes #5170
Type of Change
Checklist
Screenshots / Additional Context