mirror of https://github.com/tiangolo/fastapi.git
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
This commit is contained in:
parent
4359b9355f
commit
e899edef4a
|
|
@ -197,7 +197,7 @@ def get_openapi_operation_metadata(
|
||||||
operation["description"] = route.description
|
operation["description"] = route.description
|
||||||
operation_id = route.operation_id or route.unique_id
|
operation_id = route.operation_id or route.unique_id
|
||||||
if len(route.methods) > 1:
|
if len(route.methods) > 1:
|
||||||
operation_id = f'{operation_id}_{method.lower()}'
|
operation_id = f"{operation_id}_{method.lower()}"
|
||||||
if operation_id in operation_ids:
|
if operation_id in operation_ids:
|
||||||
message = (
|
message = (
|
||||||
f"Duplicate Operation ID {operation_id} for function "
|
f"Duplicate Operation ID {operation_id} for function "
|
||||||
|
|
|
||||||
|
|
@ -1170,9 +1170,9 @@ def test_openapi_schema():
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "Successful Response",
|
"description": "Successful Response",
|
||||||
"content": {"application/json": {"schema": {}}}
|
"content": {"application/json": {"schema": {}}},
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Multiple Methods",
|
"summary": "Multiple Methods",
|
||||||
|
|
@ -1180,15 +1180,11 @@ def test_openapi_schema():
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "Successful Response",
|
"description": "Successful Response",
|
||||||
"content": {
|
"content": {"application/json": {"schema": {}}},
|
||||||
"application/json": {
|
|
||||||
"schema": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
"components": {
|
"components": {
|
||||||
"schemas": {
|
"schemas": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue