-
Notifications
You must be signed in to change notification settings - Fork 9k
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
[Data Types] Fix minimum
and maximum
types
#24
Comments
+1. Also, is there any reason why |
I'm not sure if it's the same issue, if it's not ok to append this to the issue, please let me know. Now I found that the string representation of minimum & maximum is always number, even if their type is integer. Ex. in http://petstore.swagger.wordnik.com/api/api-docs/pet, we can find this: {
"name":"petId",
"description":"ID of pet that needs to be fetched",
"required":true,
"type":"integer",
"format":"int64",
"paramType":"path",
"allowMultiple":false,
"minimum":"1.0",
"maximum":"100000.0"} Is it expected? |
@vincentjames501 - in Swagger 2.0 the validation fields would be the same as they are in json schema draft 4. If minimum and maximum apply to string in the schema, they would be applied here as well. @mission-liao - it's pretty much the same issue, yeah. As mentioned above, it'll be changed in Swagger 2.0. |
@vincentjames501 - FYI, for |
This has been resolved in Swagger 2.0. |
Right now, the type for
minimum
andmaximum
fields isstring
. Besides the fact that this can lead to funny errors, we want to make sure we follow the JSON Schema definitions and convert the type tonumber
.The text was updated successfully, but these errors were encountered: