]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
✏️ Use `Annotated` in inline example in `docs/en/docs/tutorial/body-multiple-params...
authorAlexander Li <github@thearchons.xyz>
Sun, 24 May 2026 11:00:37 +0000 (04:00 -0700)
committerGitHub <noreply@github.com>
Sun, 24 May 2026 11:00:37 +0000 (13:00 +0200)
docs/en/docs/tutorial/body-multiple-params.md

index cdef50ec38940fffe829a2465a11f1d7b70eb29a..e7f5c096cbb2b4a6943aec1c098a989e33903c70 100644 (file)
@@ -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: