diff --git a/lib/rspec_api_documentation/configuration.rb b/lib/rspec_api_documentation/configuration.rb index edb46e69..c4721674 100644 --- a/lib/rspec_api_documentation/configuration.rb +++ b/lib/rspec_api_documentation/configuration.rb @@ -110,7 +110,7 @@ def self.add_setting(name, opts = {}) # See RspecApiDocumentation::DSL::Endpoint#do_request add_setting :response_body_formatter, default: Proc.new { |_, _| Proc.new do |content_type, response_body| - if content_type =~ /application\/json/ + if content_type =~ /application\/.*json/ JSON.pretty_generate(JSON.parse(response_body)) else response_body