Thanks to visit codestin.com
Credit goes to github.com

Skip to content

📝 Add documentation for redefined path operations#4864

Merged
tiangolo merged 2 commits into
fastapi:masterfrom
zanieb:matching-paths
May 12, 2022
Merged

📝 Add documentation for redefined path operations#4864
tiangolo merged 2 commits into
fastapi:masterfrom
zanieb:matching-paths

Conversation

@zanieb

@zanieb zanieb commented May 4, 2022

Copy link
Copy Markdown
Contributor

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.

@codecov

codecov Bot commented May 4, 2022

Copy link
Copy Markdown

Codecov Report

Merging #4864 (bac9cae) into master (146f57b) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master     #4864   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          531       531           
  Lines        13627     13629    +2     
=========================================
+ Hits         13627     13629    +2     
Impacted Files Coverage Δ
fastapi/exceptions.py 100.00% <0.00%> (ø)
fastapi/applications.py 100.00% <0.00%> (ø)
fastapi/dependencies/utils.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 146f57b...bac9cae. Read the comment docs.

@github-actions

github-actions Bot commented May 4, 2022

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 2c441af at: https://6272c2ad3e78ba024bb33491--fastapi.netlify.app

@github-actions

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit bac9cae at: https://627d32652b19d50a163a9339--fastapi.netlify.app

@tiangolo tiangolo changed the title Add documentation for redefined path operations 📝 Add documentation for redefined path operations May 12, 2022
@tiangolo tiangolo merged commit 199916a into fastapi:master May 12, 2022
@tiangolo

Copy link
Copy Markdown
Member

Awesome, thanks @madkinsz! 📝

@zanieb

zanieb commented May 12, 2022

Copy link
Copy Markdown
Contributor Author

You're welcome! I appreciate your improvements :)

JeanArhancet pushed a commit to JeanArhancet/fastapi that referenced this pull request Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants