diff --git a/fastapi/openapi/utils.py b/fastapi/openapi/utils.py index da7bebab8..fe426f247 100644 --- a/fastapi/openapi/utils.py +++ b/fastapi/openapi/utils.py @@ -393,7 +393,7 @@ def get_openapi( terms_of_service: Optional[str] = None, contact: Optional[Dict[str, Union[str, Any]]] = None, license_info: Optional[Dict[str, Union[str, Any]]] = None, - prefix: Optional[str] = None, + prefix: Optional[str] = "", ) -> Dict[str, Any]: info: Dict[str, Any] = {"title": title, "version": version} if description: