-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Ability to determine current path/path template of match in handler #266
Comments
@kisielk @elithrar any thoughts on this? Not urgent since I'm able to work around this at the handler level (I use |
I'm open to this. We should profile the performance before/after if we are stuffing more into |
I agree with @elithrar |
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days. |
Has this been implemented? |
I wanna know that too. |
No, this was not implemented. PRs are accepted, noting the performance concerns above. |
It looks like this may have been fixed in 758eb64 which improved subroute propagation. Running the posted example now shows:
Here is my bisect log:
|
If a handler matches on a route that does not have a path template defined, it is currently not possible to look up the actual path that matched. It would be ideal if there was a way for
GetPathTemplate
to have an option to check its ancestors for the first defined template in a case where none is defined on the current route.Example:
Current output:
Expected:
Some way to be able to get
"/{products}"
as the path template, either by having a version ofGetPathTemplate()
that returns the first defined template of a route's ancestors or by exposing a way to access the parent of a route.The text was updated successfully, but these errors were encountered: