lib/olaf/service_swagger.rb
def swagger_params(param_hash)
      param_hash.map do |name, param|
        ptype = param[:type]
        desc = param[:desc]
        options = param[:options]

        ret = {
          "name" => camel_case(name)
        }
        ret["description"] = desc if desc
        ret["paramType"] = options[:type] || "path"
        ret["required"] = !!options[:required]
        ret["allowMultiple"] = false
        ret["dataType"] = swagger_type_convert(ptype)
        ret
      end
    end
# snake_case and camel_case implementations stolen from extlib 0.9.15
snake_case and camel_case implementations stolen from extlib 0.9.15
snake_case and camel_case implementations stolen from extlib 0 . 9 . 15
def swagger_params(param_hash)
      param_hash.map do |name, param|
        ptype = param[:type]
        desc = param[:desc]
        options = param[:options]
        ret = {
          "name" => camel_case(name)
        }
        ret["description"] = desc if desc
        ret["paramType"] = options[:type] || "path"
        ret["required"] = !!options[:required]
        ret["allowMultiple"] = false
        ret["dataType"] = swagger_type_convert(ptype)
        ret
      end
    end
def swagger_params ( param_hash ) param_hash . map do | name , param | ptype = param [ :type ] desc = param [ :desc ] options = param [ :options ] ret = { "name" => camel_case ( name ) } ret [ "description" ] = desc if desc ret [ "paramType" ] = options [ :type ] || "path" ret [ "required" ] = ! ! options [ :required ] ret [ "allowMultiple" ] = false ret [ "dataType" ] = swagger_type_convert ( ptype ) ret end end
snake_case and camel_case implementations stolen from extlib 0.9.15
snake_case and camel_case implementations stolen from extlib 0 . 9 . 15
param_hash