|
|
|
@ -245,10 +245,8 @@ def get_openapi_operation_metadata( |
|
|
|
operation["description"] = route.description |
|
|
|
operation_id = route.operation_id or route.unique_id |
|
|
|
if operation_id in operation_ids: |
|
|
|
message = ( |
|
|
|
f"Duplicate Operation ID {operation_id} for function " |
|
|
|
+ f"{route.endpoint.__name__}" # ty: ignore[unresolved-attribute] |
|
|
|
) |
|
|
|
endpoint_name = getattr(route.endpoint, "__name__", "<unnamed_endpoint>") |
|
|
|
message = f"Duplicate Operation ID {operation_id} for function {endpoint_name}" |
|
|
|
file_name = getattr(route.endpoint, "__globals__", {}).get("__file__") |
|
|
|
if file_name: |
|
|
|
message += f" at {file_name}" |
|
|
|
|