-
Notifications
You must be signed in to change notification settings - Fork 11
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
Optional matching? #19
Comments
you can do it by setting prefix to true... what we need is a 'any' match for example: |
No, this package doesn't currently support optional parameters, although it seems like a reasonable feature. As a workaround you could potentially just define multiple matchers per route (or multiple routes) to support this. |
I don't think that would meet the requirements requested here. That approach means something like |
Right, the "aliases" approach is basically how we deal with this now, so you would need to define a path value of: This request is basically asking to not have to do that, but instead some streamlined syntax to express this. |
are there any changes we will eventually get this feature? |
Curious if there is a way to define
'/user/:id'
so that it will match/user
/user/
and/user/1
?Similarly, could we define
billing/:foo/:bar
so that only:foo
is required and bar is optional?The text was updated successfully, but these errors were encountered: