require 'rspec_api_documentation' require 'rspec_api_documentation/dsl' RspecApiDocumentation.configure do |config| config.format = [:json, :html] config.api_name = '<%= app_name %>' config.curl_headers_to_filter = %w('Cookie') config.post_body_formatter = 'json' config.keep_source_order = true config.request_headers_to_include = ['Accept', 'Content-Type', 'Authorization', 'Host'] # Removes the DSL method `status`, # this is required if you have a parameter named status # response_status is an alias to status # because status is commonly a parameter. config.disable_dsl_status! if ENV['CIRCLE_ARTIFACTS'] config.docs_dir = Pathname.new("#{ENV['CIRCLE_ARTIFACTS']}/api-docs") end end RSpec.configure do |config| config.before(:each) do |example| if example.metadata[:document] header 'Accept', 'application/json' header 'Content-Type', 'application/json' end end end