Sha256: 00cbbaa7c2261d741e9fd7df6829fc5ca2025253df1fd9b9be757372483ff3f3

Contents?: true

Size: 364 Bytes

Versions: 1

Compression:

Stored size: 364 Bytes

Contents

# frozen_string_literal: true

module GrapeSwagger
  module DocMethods
    class FileParams
      class << self
        def includes_file_param?(params)
          return params.any? { |x| x[:type] == 'file' }
        end

        def to_formdata(params)
          params.each { |x| x[:in] = 'formData' if x[:in] == 'body' }
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gitlab-grape-swagger-1.5.0 lib/grape-swagger/doc_methods/file_params.rb