mirror of
https://github.com/fastapi/fastapi.git
synced 2026-05-03 05:03:59 -04:00
📝 Update docs highlighting after re-sort imports
coming back to flit, after pipenv
This commit is contained in:
@@ -6,7 +6,7 @@ First, of course, you can mix `Path`, `Query` and request body parameter declara
|
||||
|
||||
And you can also declare body parameters as optional, by setting the default to `None`:
|
||||
|
||||
```Python hl_lines="18 19 20"
|
||||
```Python hl_lines="17 18 19"
|
||||
{!./tutorial/src/body_multiple_params/tutorial001.py!}
|
||||
```
|
||||
|
||||
@@ -29,7 +29,7 @@ In the previous example, the path operations would expect a JSON body with the a
|
||||
|
||||
But you can also declare multiple body parameters, e.g. `item` and `user`:
|
||||
|
||||
```Python hl_lines="21"
|
||||
```Python hl_lines="20"
|
||||
{!./tutorial/src/body_multiple_params/tutorial002.py!}
|
||||
```
|
||||
|
||||
@@ -71,7 +71,7 @@ If you declare it as is, because it is a singular value, **FastAPI** will assume
|
||||
But you can instruct **FastAPI** to treat it as another body key using `Body`:
|
||||
|
||||
|
||||
```Python hl_lines="22"
|
||||
```Python hl_lines="21"
|
||||
{!./tutorial/src/body_multiple_params/tutorial003.py!}
|
||||
```
|
||||
|
||||
@@ -108,7 +108,7 @@ q: str = None
|
||||
|
||||
as in:
|
||||
|
||||
```Python hl_lines="27"
|
||||
```Python hl_lines="25"
|
||||
{!./tutorial/src/body_multiple_params/tutorial004.py!}
|
||||
```
|
||||
|
||||
@@ -130,7 +130,7 @@ item: Item = Body(..., embed=True)
|
||||
|
||||
as in:
|
||||
|
||||
```Python hl_lines="16"
|
||||
```Python hl_lines="15"
|
||||
{!./tutorial/src/body_multiple_params/tutorial005.py!}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user