Skip to content

Commit df4ed6c

Browse files
committed
Add description to configuration
1 parent 3ad1ab7 commit df4ed6c

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ RspecApiDocumentation.configure do |config|
118118

119119
# Change the name of the API on index pages
120120
config.api_name = "API Documentation"
121+
122+
# Change the description of the API on index pages
123+
config.api_explanation = "API Description"
121124

122125
# Redefine what method the DSL thinks is the client
123126
# This is useful if you need to `let` your own client, most likely a model.

example/spec/acceptance_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
config.format = [:json, :combined_text, :html]
77
config.curl_host = 'http://localhost:3000'
88
config.api_name = "Example App API"
9+
config.api_explanation = "API Example Description"
910
end

lib/rspec_api_documentation/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def self.add_setting(name, opts = {})
7575
add_setting :curl_host, :default => nil
7676
add_setting :keep_source_order, :default => false
7777
add_setting :api_name, :default => "API Documentation"
78+
add_setting :api_explanation, :default => nil
7879
add_setting :io_docs_protocol, :default => "http"
7980
add_setting :request_headers_to_include, :default => nil
8081
add_setting :response_headers_to_include, :default => nil

spec/configuration_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
its(:curl_host) { should be_nil }
5353
its(:keep_source_order) { should be_falsey }
5454
its(:api_name) { should == "API Documentation" }
55+
its(:api_explanation) { should be_nil }
5556
its(:client_method) { should == :client }
5657
its(:io_docs_protocol) { should == "http" }
5758
its(:request_headers_to_include) { should be_nil }

0 commit comments

Comments
 (0)