Skip to content

Commit

Permalink
馃帹 [pre-commit.ci] Auto format from pre-commit.com hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Apr 25, 2023
1 parent decec89 commit 8baa138
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fastapi/openapi/utils.py
Expand Up @@ -332,10 +332,8 @@ def get_openapi_path(
openapi_response["description"] = description
http422 = str(HTTP_422_UNPROCESSABLE_ENTITY)
if (all_route_params or route.body_field) and not any(
[
status in operation["responses"]
for status in [http422, "4XX", "default"]
]
status in operation["responses"]
for status in [http422, "4XX", "default"]
):
operation["responses"][http422] = {
"description": "Validation Error",
Expand Down

0 comments on commit 8baa138

Please sign in to comment.