From e7f361cacb8f0715c2ae6021511176fd46a88806 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 18:32:30 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/openapi/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fastapi/openapi/utils.py b/fastapi/openapi/utils.py index 53333b6648..88786087a0 100644 --- a/fastapi/openapi/utils.py +++ b/fastapi/openapi/utils.py @@ -419,8 +419,7 @@ def get_openapi_path( all_route_params = get_flat_params(route.dependant) requires_validation_error = bool(all_route_params or route.body_field) has_validation_response = any( - status in operation["responses"] - for status in ("422", "4XX", "default") + status in operation["responses"] for status in ("422", "4XX", "default") ) if requires_validation_error and not has_validation_response: operation["responses"][http422] = {