From 1049e4a03a80a8d452d7817ae081c63f9ed1352b Mon Sep 17 00:00:00 2001 From: victorroli Date: Sun, 23 Mar 2025 12:16:40 -0300 Subject: [PATCH] fix: Include Optional in parameter type and remove Union --- docs/pt/docs/deployment/docker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pt/docs/deployment/docker.md b/docs/pt/docs/deployment/docker.md index cf18bb153..4e34ab814 100644 --- a/docs/pt/docs/deployment/docker.md +++ b/docs/pt/docs/deployment/docker.md @@ -161,7 +161,7 @@ def read_root(): @app.get("/items/{item_id}") -def read_item(item_id: int, q: Union[str, None] = None): +def read_item(item_id: int, q: Optional[str] = None): return {"item_id": item_id, "q": q} ```