Browse Source

🐛 Fix setting 4XX overriding default 422 validation errors(#517)

pull/554/head
tsouvarev 6 years ago
committed by Sebastián Ramírez
parent
commit
3dbbecdd16
  1. 2
      fastapi/openapi/utils.py

2
fastapi/openapi/utils.py

@ -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] = {

Loading…
Cancel
Save