Skip to content

Commit dde73d5

Browse files
committed
Return nil in Ruby clients for operations that have no response type defined
1 parent deca6a0 commit dde73d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/swagger-codegen/src/main/resources/ruby/api.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ module {{moduleName}}
5151
{{/bodyParam}}
5252

5353
{{#returnType}}response = Swagger::Request.new(:{{httpMethod}}, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body}).make.body
54-
{{#returnContainer}}response.map {|response| {{/returnContainer}}obj = {{returnBaseType}}.new() and obj.build_from_hash(response){{#returnContainer}} }{{/returnContainer}}{{/returnType}}{{^returnType}} Swagger::Request.new(:{{httpMethod}}, path, {:params => query_params,:headers => header_params, :form_params => form_params, :body => post_body}).make{{/returnType}}
54+
{{#returnContainer}}response.map {|response| {{/returnContainer}}obj = {{returnBaseType}}.new() and obj.build_from_hash(response){{#returnContainer}} }{{/returnContainer}}{{/returnType}}{{^returnType}} Swagger::Request.new(:{{httpMethod}}, path, {:params => query_params,:headers => header_params, :form_params => form_params, :body => post_body}).make
55+
nil{{/returnType}}
5556
end
5657
{{/operation}}
5758
end

0 commit comments

Comments
 (0)