Skip to content

Commit 4cfef51

Browse files
authored
Merge pull request #367 from timurvafin/json-api-format
Recognize JSON API response as JSON
2 parents 3878ba9 + 2d8e8a4 commit 4cfef51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rspec_api_documentation/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def self.add_setting(name, opts = {})
110110
# See RspecApiDocumentation::DSL::Endpoint#do_request
111111
add_setting :response_body_formatter, default: Proc.new { |_, _|
112112
Proc.new do |content_type, response_body|
113-
if content_type =~ /application\/json/
113+
if content_type =~ /application\/.*json/
114114
JSON.pretty_generate(JSON.parse(response_body))
115115
else
116116
response_body

0 commit comments

Comments
 (0)