Fix: adding additional_responses on .include_router()

This commit is contained in:
Mohammed
2019-03-23 00:37:10 +03:00
parent 84a300ef84
commit 95679ca5e6
3 changed files with 5 additions and 55 deletions

View File

@@ -206,7 +206,7 @@ def get_openapi_path(
},
}
for add_response_code, add_response in route.additional_responses.items():
add_response_schema = {}
add_response_schema: Dict[str, Any] = {}
if (
add_response.content_type or route.content_type.media_type
) == "application/json" and add_response.schema_field is not None: