minimum and maximum give us the minimum or maximum value that a number can be (val >= 2 for example), but that's not the same as exclusiveMinimum or exclusiveMaximum which give us the the min or max it can get close to (val > 2 instead) — this is important and useful for floats especially.
Given that in 2.0 and 3.0, exclusiveMinimum/exclusiveMaximum output is a boolean and in 3.1 it's the number itself, I think it would be nice to have a coherent and consistent way to handle this.
My best suggestion is (example) @exclusiveMinimum 3 — this will set our output to be exclusiveMinimum: 3 in 3.1, but exclusiveMinimum: true; minimum: 3 in 2.0 and 3.0
If you use minimum and exclusiveMinimum at the same time in 3.1, it should be fine (but the more stricter of the two will win out).
If you use minimum and exclusiveMinimum at the same time in 2.0 and 3.0, let's call that a compiler error.
minimumandmaximumgive us the minimum or maximum value that a number can be (val >= 2for example), but that's not the same asexclusiveMinimumorexclusiveMaximumwhich give us the the min or max it can get close to (val > 2instead) — this is important and useful for floats especially.Given that in 2.0 and 3.0, exclusiveMinimum/exclusiveMaximum output is a boolean and in 3.1 it's the number itself, I think it would be nice to have a coherent and consistent way to handle this.
My best suggestion is (example)
@exclusiveMinimum 3— this will set our output to beexclusiveMinimum: 3in 3.1, butexclusiveMinimum: true; minimum: 3in 2.0 and 3.0If you use
minimumandexclusiveMinimumat the same time in 3.1, it should be fine (but the more stricter of the two will win out).If you use
minimumandexclusiveMinimumat the same time in 2.0 and 3.0, let's call that a compiler error.