mirror of
https://github.com/fastapi/fastapi.git
synced 2026-03-05 15:37:08 -05:00
🐛 Fix setting 4XX overriding default 422 validation errors(#517)
This commit is contained in:
committed by
Sebastián Ramírez
parent
6d5530ec1c
commit
3dbbecdd16
@@ -225,7 +225,7 @@ def get_openapi_path(
|
||||
if (all_route_params or route.body_field) and not any(
|
||||
[
|
||||
status in operation["responses"]
|
||||
for status in [http422, "4xx", "default"]
|
||||
for status in [http422, "4XX", "default"]
|
||||
]
|
||||
):
|
||||
operation["responses"][http422] = {
|
||||
|
||||
Reference in New Issue
Block a user