mirror of https://github.com/tiangolo/fastapi.git
📝 Update dependencies docs
This commit is contained in:
parent
c9758e15a1
commit
ba1bcf76ec
|
|
@ -76,7 +76,7 @@ And you can declare dependencies with `async def` inside of normal `def` path op
|
||||||
It doesn't matter. **FastAPI** will know what to do.
|
It doesn't matter. **FastAPI** will know what to do.
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
If you don't if you should use `async def` or not, check the section about [`async` and `await` in the docs](async.md).
|
If you don't if you should use `async def` or not, check the section about [`async` and `await` in the docs](/tutorial/async.md).
|
||||||
|
|
||||||
## Integrated wiht OpenAPI
|
## Integrated wiht OpenAPI
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,12 @@ And now we can use that model in our code, with all the lovable editor support:
|
||||||
|
|
||||||
<img src="/img/tutorial/dependencies/image02.png">
|
<img src="/img/tutorial/dependencies/image02.png">
|
||||||
|
|
||||||
|
## Trees of hierarchical dependencies
|
||||||
|
|
||||||
|
With the **Dependency Injection** system you can build arbitrarily deep trees of hierarchical dependencies (also known as dependency graphs) by having dependencies that also have dependencies themselves.
|
||||||
|
|
||||||
|
You will see examples of these dependency trees in the next chapters about security.
|
||||||
|
|
||||||
## Recap
|
## Recap
|
||||||
|
|
||||||
By using Pydantic models in your dependencies too you can keep all the editor support that **FastAPI** is designed to support.
|
By using Pydantic models in your dependencies too you can keep all the editor support that **FastAPI** is designed to support.
|
||||||
Loading…
Reference in New Issue