From 61f936efe993d24b8d8a4dd212e52364135b1ba1 Mon Sep 17 00:00:00 2001 From: Yaswanth Naga Sai K <140506928+YASWANTH1976@users.noreply.github.com> Date: Sun, 4 Jan 2026 17:51:44 +0530 Subject: [PATCH] Docs: clarify response_model filtering behavior --- docs/en/docs/tutorial/response-model.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/en/docs/tutorial/response-model.md b/docs/en/docs/tutorial/response-model.md index b287cdf50..addfc4403 100644 --- a/docs/en/docs/tutorial/response-model.md +++ b/docs/en/docs/tutorial/response-model.md @@ -48,6 +48,8 @@ Notice that `response_model` is a parameter of the "decorator" method (`get`, `p `response_model` receives the same type you would declare for a Pydantic model field, so, it can be a Pydantic model, but it can also be, e.g. a `list` of Pydantic models, like `List[Item]`. FastAPI will use this `response_model` to do all the data documentation, validation, etc. and also to **convert and filter the output data** to its type declaration. +Note that this filtering applies only to the response sent to the client. +The object returned inside the path operation function is not modified. /// tip