-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
integer & number minimum (& maximum) don't allow a minimum of zero (or any negative numbers) #424
Comments
will provide a patch to fix this today. |
This is fixed in |
Hi, @daveshanley . The 0.8.1 fix works now a Maybe one way to validate this is to take one or all of I hope I'm not off base on this. Thanks as always! |
Agreed @darrenspurgeon – minimum and maximum should both be numbers, and minimum should be less than maximum. Other than than, I suppose if the type is integer, they should both be integers, and if the format is int32, they should be within the range of -2,147,483,648 to 2,147,437 (-2^31 to 2^31 - 1) – similarly limited for int64. In Go, the constants for these should be available as But, other than that, I don't think I'd be overly strict on this aspect of schema definition. |
Hi, I re-checked the spec, negative numbers are allowed for min/max. I will update the rule. |
Signed-off-by: quobix <dave@quobix.com>
Signed-off-by: quobix <dave@quobix.com>
resolved in |
vacuum/functions/openapi/schema_type.go
Line 86 in 7062757
I believe this is tripping up both integer and number schemas with a
minimum: 0
qualifier. But, integers and numbers are both signed, so why restrict the minimum (and maximum, checked a few lines below this one) to being greater than 0? You should be able to have aminimum: -100
and amaximum: -50
if you want to.The text was updated successfully, but these errors were encountered: