Browse Source

Use Annotated in Body - Multiple Parameters Tutorial Example

The full example in the tutorial recommends and uses Annotated, but one line still uses the non-Annotated syntax.
pull/15591/head
Alexander Li 2 weeks ago
committed by TheArchons
parent
commit
5ffdaaeb61
  1. 2
      docs/en/docs/tutorial/body-multiple-params.md

2
docs/en/docs/tutorial/body-multiple-params.md

@ -126,7 +126,7 @@ By default, **FastAPI** will then expect its body directly.
But if you want it to expect a JSON with a key `item` and inside of it the model contents, as it does when you declare extra body parameters, you can use the special `Body` parameter `embed`:
```Python
item: Item = Body(embed=True)
item: Annotated[Item, Body(embed=True)]
```
as in:

Loading…
Cancel
Save