Skip to content

Commit 3dbbecd

Browse files
tsouvarevtiangolo
authored andcommitted
🐛 Fix setting 4XX overriding default 422 validation errors(fastapi#517)
1 parent 6d5530e commit 3dbbecd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fastapi/openapi/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def get_openapi_path(
225225
if (all_route_params or route.body_field) and not any(
226226
[
227227
status in operation["responses"]
228-
for status in [http422, "4xx", "default"]
228+
for status in [http422, "4XX", "default"]
229229
]
230230
):
231231
operation["responses"][http422] = {

0 commit comments

Comments
 (0)