📝 Add documentation for redefined path operations#4864
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4864 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 531 531
Lines 13627 13629 +2
=========================================
+ Hits 13627 13629 +2
Continue to review full report at Codecov.
|
Contributor
|
📝 Docs preview for commit 2c441af at: https://6272c2ad3e78ba024bb33491--fastapi.netlify.app |
zangell44
approved these changes
May 11, 2022
Contributor
|
📝 Docs preview for commit bac9cae at: https://627d32652b19d50a163a9339--fastapi.netlify.app |
Member
|
Awesome, thanks @madkinsz! 📝 |
Contributor
Author
|
You're welcome! I appreciate your improvements :) |
JeanArhancet
pushed a commit
to JeanArhancet/fastapi
that referenced
this pull request
Aug 20, 2022
Co-authored-by: Sebastián Ramírez <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We define a FastAPI application that needs to have some selective routes overridden, but redefining a route does not change its behavior. This makes some sense once you read https://www.starlette.io/routing/#route-priority but was not entirely clear in https://fastapi.tiangolo.com/tutorial/path-params/#order-matters.
This pull request adds a brief blurb to the "Order matters" section about redefinition of path operations. Preview at https://6272c2ad3e78ba024bb33491--fastapi.netlify.app/tutorial/path-params/#order-matters
I'd also like to open a separate PR to link to the Starlette routing documentation and describe why adding routers with colliding path operations always results in the first router's implementation being used. Let me know if there's a good place for that.