lib/model-api/api_context.rb
def filter_process_param(raw_value, attr_metadata, opts)
      raw_value = raw_value.to_s.strip
      array = nil
      if raw_value.starts_with?('[') && raw_value.ends_with?(']')
        array = JSON.parse(raw_value) rescue nil
        array = array.is_a?(Array) ? array.map(&:to_s) : nil
      end
      if array.nil?
        if attr_metadata.include?(:filter_delimiter)
          delimiter = attr_metadata[:filter_delimiter]
        else
          delimiter = ','
        end
        array = raw_value.split(delimiter) if raw_value.include?(delimiter)
      end
      return filter_process_param_array(array, attr_metadata, opts) unless array.nil?
      operator, value = parse_filter_operator(raw_value)
      [[operator, ModelApi::Utils.transform_value(value, attr_metadata[:parse], opts)]]
    end
def filter_process_param(raw_value, attr_metadata, opts)
      raw_value = raw_value.to_s.strip
      array = nil
      if raw_value.starts_with?('[') && raw_value.ends_with?(']')
        array = JSON.parse(raw_value) rescue nil
        array = array.is_a?(Array) ? array.map(&:to_s) : nil
      end
      if array.nil?
        if attr_metadata.include?(:filter_delimiter)
          delimiter = attr_metadata[:filter_delimiter]
        else
          delimiter = ','
        end
        array = raw_value.split(delimiter) if raw_value.include?(delimiter)
      end
      return filter_process_param_array(array, attr_metadata, opts) unless array.nil?
      operator, value = parse_filter_operator(raw_value)
      [[operator, ModelApi::Utils.transform_value(value, attr_metadata[:parse], opts)]]
    end
rubocop:enable Metrics/ParameterLists