Method split_long_comment_line
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
def split_long_comment_line(line, base_indent: 0, wrap_indent: 0, max_line_length: MAX_LINE_LENGTH)
max_width = max_line_length - base_indent - 2
current_line = []
lines = []
Method tags
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
def tags
output = parameters.map do |param|
param_type = param["type"] ? param["type"].capitalize : "Object"
param_type = "Hash" if param["schema"]
if param_type == "Array"
Method handle_duplicate_operations
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
def handle_duplicate_operations
operation_map = operations.group_by { |op| snakecase(op.operation["operationId"]) }
Method method_definition
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
def method_definition
method_name = snakecase(operation.delete("operationId"))
required_params = parameters.select { |p| p["required"] }&.map { |p| snakecase(p["name"]) } || []
optional_params = parameters.reject do |p|