File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
lib/rspec_api_documentation/dsl Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -38,19 +38,21 @@ def do_request(extra_params = {})
38
38
if method == :get && !query_string . blank?
39
39
path_or_query += "?#{ query_string } "
40
40
else
41
- formatter = RspecApiDocumentation . configuration . post_body_formatter
42
- case formatter
43
- when :json
44
- params_or_body = params . to_json
45
- when :xml
46
- params_or_body = params . to_xml
47
- when Proc
48
- params_or_body = formatter . call ( params )
41
+ if respond_to? ( :raw_post )
42
+ params_or_body = raw_post
49
43
else
50
- params_or_body = params
44
+ formatter = RspecApiDocumentation . configuration . post_body_formatter
45
+ case formatter
46
+ when :json
47
+ params_or_body = params . to_json
48
+ when :xml
49
+ params_or_body = params . to_xml
50
+ when Proc
51
+ params_or_body = formatter . call ( params )
52
+ else
53
+ params_or_body = params
54
+ end
51
55
end
52
-
53
- params_or_body = respond_to? ( :raw_post ) ? raw_post : params_or_body
54
56
end
55
57
56
58
rspec_api_documentation_client . send ( method , path_or_query , params_or_body , headers )
You can’t perform that action at this time.
0 commit comments