Browse Source
style: PEP 8 fixes in openapi/utils.py
Added missing trailing commas in 'validation_error_response_definition'
Fixed string concatenation in warning message to use implicit concatenation
pull/14754/head
Ruslan Markelov
6 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
3 deletions
-
fastapi/openapi/utils.py
|
|
@ -61,7 +61,7 @@ validation_error_response_definition = { |
|
|
"title": "Detail", |
|
|
"title": "Detail", |
|
|
"type": "array", |
|
|
"type": "array", |
|
|
"items": {"$ref": REF_PREFIX + "ValidationError"}, |
|
|
"items": {"$ref": REF_PREFIX + "ValidationError"}, |
|
|
} |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -242,8 +242,8 @@ def get_openapi_operation_metadata( |
|
|
operation_id = route.operation_id or route.unique_id |
|
|
operation_id = route.operation_id or route.unique_id |
|
|
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} " |
|
|
+ f"{route.endpoint.__name__}" |
|
|
f"for function {route.endpoint.__name__}" |
|
|
) |
|
|
) |
|
|
file_name = getattr(route.endpoint, "__globals__", {}).get("__file__") |
|
|
file_name = getattr(route.endpoint, "__globals__", {}).get("__file__") |
|
|
if file_name: |
|
|
if file_name: |
|
|
|