From d8cf0801f724253965dc26ede3bf3ac9a0fc54ef Mon Sep 17 00:00:00 2001 From: Grayson Pike Date: Mon, 4 Mar 2024 17:07:36 -0500 Subject: [PATCH] Update request body tutorial note to reference 3.10+ syntax --- docs/en/docs/tutorial/body.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/docs/tutorial/body.md b/docs/en/docs/tutorial/body.md index 67ba48f1e..72b6d532c 100644 --- a/docs/en/docs/tutorial/body.md +++ b/docs/en/docs/tutorial/body.md @@ -206,7 +206,7 @@ The function parameters will be recognized as follows: !!! note FastAPI will know that the value of `q` is not required because of the default value `= None`. - The `Union` in `Union[str, None]` is not used by FastAPI, but will allow your editor to give you better support and detect errors. + The `| None` in `q: str | None` is not used by FastAPI, but will allow your editor to give you better support and detect errors. ## Without Pydantic