From 972c0c507d92c3118862528b5706b923d1e2d67f Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Tue, 25 Nov 2025 16:38:13 +0100 Subject: [PATCH] Fix docstring of `servers` parameter --- fastapi/applications.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fastapi/applications.py b/fastapi/applications.py index 0a47699ae..76b5e146a 100644 --- a/fastapi/applications.py +++ b/fastapi/applications.py @@ -301,7 +301,11 @@ class FastAPI(Starlette): browser tabs open). Or if you want to leave fixed the possible URLs. If the servers `list` is not provided, or is an empty `list`, the - default value would be a `dict` with a `url` value of `/`. + `servers` property in the generated OpenAPI will be: + + * a `dict` with a `url` value of application's mounting point + (`root_path`) if it's different from `/`. + * otherwise, `servers` property will be omitted from the OpenAPI schema. Each item in the `list` is a `dict` containing: