Closed delaguilaluis closed 7 years ago
Looks good. Do you have a connection to the owners of the repo and can find out when will they check this request?
Looks good to me :+1:
@tlivings , Can you also check the pull request to fix the min/max issues?
@delaguilaluis Hi Luis, can you check the CI failure. I can merge this, if we get green build.
Hi @subeeshcbabu ! The CI failure is because the lint command is failing. The output shows this error:
lib/buildroutes.js: line 27, col 38, This function's cyclomatic complexity is too high. (17)
I didn't modified that file, but let me know if I could help on a refactor to fix it.
Closing this since #80 fixed it.
Now more options are passed to enjoi, so joi convert
s the string values to the schema type.
Currently if a string parameter is validated against a schema specifying it as 'number', it would not be coerced.
When validating the input string '0', the result from validation (the number 0) would be taken as a "falsy" value and the original string '0' would be returned.
So, the type 'number', which is part of the Swagger specification was added to the cases to consider on coercion to avoid this behavior.