forked from loafle/openapi-generator-original
Merge branch 'bug-fix-ruby-file-upload' into ruby-api-client
Conflicts: modules/swagger-codegen/src/main/resources/ruby/swagger/request.mustache samples/client/petstore/ruby/lib/petstore/swagger/request.rb
This commit is contained in:
@@ -290,7 +290,8 @@ module {{moduleName}}
|
||||
|
||||
def build_request_body(header_params, form_params, body)
|
||||
# http form
|
||||
if header_params['Content-Type'] == 'application/x-www-form-urlencoded'
|
||||
if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
|
||||
header_params['Content-Type'] == 'multipart/form-data'
|
||||
data = form_params.dup
|
||||
data.each do |key, value|
|
||||
data[key] = value.to_s if value && !value.is_a?(File)
|
||||
|
||||
Reference in New Issue
Block a user