From 94471512bbd3d095845bb77230732b98b0c00833 Mon Sep 17 00:00:00 2001 From: Lasisi Ibrahim <113442282+ibrahimpelumi6142@users.noreply.github.com> Date: Tue, 9 Dec 2025 22:30:46 +0000 Subject: [PATCH] Update body.md --- docs/en/docs/tutorial/body.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/en/docs/tutorial/body.md b/docs/en/docs/tutorial/body.md index a820802f7..b933adb55 100644 --- a/docs/en/docs/tutorial/body.md +++ b/docs/en/docs/tutorial/body.md @@ -20,6 +20,13 @@ As it is discouraged, the interactive docs with Swagger UI won't show the docume ## Import Pydantic's `BaseModel` { #import-pydantics-basemodel } +/// note + +`BaseModel` is the main class from Pydantic used for creating data models. +FastAPI needs this import to validate request bodies and generate documentation. + +/// + First, you need to import `BaseModel` from `pydantic`: {* ../../docs_src/body/tutorial001_py310.py hl[2] *}