for swagger_path, methods in swagger_endpoints_with_operations.items():
if path_matches_swagger(noir_path, swagger_path):
if methods:
print(methods)
print("\n")
# Сначала пробуем найти метод, соответствующий noir_method
if noir_method in methods:
return methods[noir_method]["operationId"]
# Если не нашли, пробуем 'get' как fallback
if "get" in methods:
return methods["get"]["operationId"]
# Если нет 'get', берем первый доступный метод
for method, details in methods.items():
if "operationId" in details:
return details["operationId"]