sanic#1480 Allow negative int/number in path (#1481)

* sanic#1480 Allow negative int/number

* Rerun ``make beautify`` on this change.
This commit is contained in:
Enda Farrell
2019-02-05 14:54:48 +01:00
committed by Stephen Sadowski
parent 52bdd1d5a2
commit b926a2c9b0
2 changed files with 34 additions and 4 deletions

View File

@@ -17,8 +17,8 @@ Parameter = namedtuple("Parameter", ["name", "cast"])
REGEX_TYPES = {
"string": (str, r"[^/]+"),
"int": (int, r"\d+"),
"number": (float, r"[0-9\\.]+"),
"int": (int, r"-?\d+"),
"number": (float, r"-?[0-9\\.]+"),
"alpha": (str, r"[A-Za-z]+"),
"path": (str, r"[^/].*?"),
"uuid": (