Sha256: 190544496e8cd180e30063d7c61036a32488ba1e6d84a0801d16e0d2a6a59d63

Contents?: true

Size: 1.02 KB

Versions: 5

Compression:

Stored size: 1.02 KB

Contents

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
kratos-1.1.0 templates/rspec_api_documentation_rspec.rb.erb
kratos-1.0.3 templates/rspec_api_documentation_rspec.rb.erb
kratos-1.0.2 templates/rspec_api_documentation_rspec.rb.erb
kratos-1.0.1 templates/rspec_api_documentation_rspec.rb.erb
kratos-1.0.0 templates/rspec_api_documentation_rspec.rb.erb