Closed mikatuo closed 10 months ago
I don't have a strong preference, but I’m afraid that this will grow to make pretty complex routes, so maybe the suggestion to use *params
in the route and then parse it in a controller is the most future-proof one.
We compile our routes to pattern matching and the VM does not support suffix matches at the moment. So this feature needs to be added upstream first. For now the best option is to match on everything and then you dispatch accordingly.
Current behavior
Valid routes:
Invalid routes:
^ they will raise "(Plug.Router.InvalidSpecError) invalid dynamic path. Only letters, numbers, and underscore are allowed after :"
A workaround would be to use a
*name
parameter and then parse it in a controller.Expected behavior
In addition to
/
allow usage of-
or.
after a:param
in dynamic routes.