-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use router path as resource name #28
Use router path as resource name #28
Conversation
Codecov Report
@@ Coverage Diff @@
## master #28 +/- ##
===========================================
- Coverage 100.00% 5.92% -94.08%
===========================================
Files 9 6 -3
Lines 348 253 -95
===========================================
- Hits 348 15 -333
- Misses 0 238 +238
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #28 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 9 9
Lines 354 434 +80
=====================================
+ Hits 354 434 +80
Continue to review full report at Codecov.
|
9f389b7
to
9a2cce1
Compare
Can't figure out how to test partial match yet, which causes build to fail due to lower than expected test coverage. |
Thanks! This is lookind great so far.
According to this snippet, So I assume we should be able to cover that code path by issuing a |
@inikolaev I pushed and merged two PRs (#29, #30) to clean up the test setup, feel free to merge master back in here — you should have a few issues off your plate. :-) |
9a2cce1
to
6bd2327
Compare
Yes, I was just confused about which status code to expect, but now it should be fine. |
I made |
Thanks! I’ll try and leave a review soon. :) |
Did you have a chance to look at it? |
Hi @inikolaev, I had forgotten about this so no, not yet. I keep the notification in my inbox and plan to address this week. :) |
Hi @inikolaev, having reviewed this, thought about this a bit more, and found more use cases for customizing the default behavior (eg for my personal website), I don't think this would be the right way to go anymore. I opened #32 with ideas about an extension mechanism that should also allow you to resolve your use case (although it would indeed require writing some code). Can you take a look over there and confirm? Thanks! I'm closing this in the meantime, thanks for the time you've put into this. :-) |
I’ll take a look! Can you take a look at this PR about adding routes to Starlette scope and add some suggestions to make it more framework agnostic, since there’s nothing about routes in the standard: https://github.com/encode/starlette/pull/804/files |
@inikolaev I don't think it can be made framework agnostic, unfortunately. The ASGI spec doesn't say anyway about how applications should handle routing (or whether they even have to). I played with the idea of a standardized So I think encode/starlette#804 looks good right now. If nothing else if it should allow you to integrate with |
That true, if frameworks want to add some framework-specific fields, that should be put into some standardized namespace, to avoid clashing with standard fields added in the future. |
Fixes #27