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
path arguments of type number can't accept integers #1041
Comments
This was referenced Sep 18, 2019
As @davidism points out in pallets/werkzeug#1645 one can make a custom converter such as |
logi
added a commit
to Belgingur/connexion
that referenced
this issue
Oct 16, 2020
These don't try to enforce a "single representation" of paths but instead try to convert the numbers that callers pass in. Addresses spec-first#1040 and spec-first#1041
logi
added a commit
to Belgingur/connexion
that referenced
this issue
Jul 14, 2021
These don't try to enforce a "single representation" of paths but instead try to convert the numbers that callers pass in. Addresses spec-first#1040 and spec-first#1041
logi
added a commit
to Belgingur/connexion
that referenced
this issue
Jul 14, 2021
These don't try to enforce a "single representation" of paths but instead try to convert the numbers that callers pass in. Addresses spec-first#1040 and spec-first#1041
hjacobs
pushed a commit
that referenced
this issue
Jul 14, 2021
* Use more liberal flask converters for float and int These don't try to enforce a "single representation" of paths but instead try to convert the numbers that callers pass in. Addresses #1040 and #1041 * Use f-strings instead of string concat or %-formats * Complying with style rules added long after this PR was made
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The Swagger and OpenAPI specs don't say anything about arguments of type number being restricted to non-integer values. However, passing an integer in for a number or integer variable results in a 404 Not Found.
This seems to be behaviour inherited from Flask's
int
andfloat
converters which they inherited from Werkzeug and reading their code, they still validate againsregex = r"\d+\.\d+"
This is the less tractable sister of #1040 since it requires the introduction of a flag in Werkzeug's
FloatConverter
class to relax the regular expression above.The text was updated successfully, but these errors were encountered: