Skip to content

Commit 48e7f7a

Browse files
author
Leonard Chin
committed
Include resource explanations in Slate output
1 parent 35bac0b commit 48e7f7a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

features/slate_documentation.feature

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Feature: Generate Slate documentation from test examples
5757
end
5858
5959
resource 'Orders' do
60+
explanation "An Order represents an amount of money to be paid"
6061
get '/orders' do
6162
response_field :page, "Current page"
6263
@@ -216,6 +217,7 @@ Feature: Generate Slate documentation from test examples
216217
217218
## Creating an order
218219
220+
An Order represents an amount of money to be paid
219221
220222
### Request
221223

lib/rspec_api_documentation/writers/slate_writer.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def write
2626
IndexHelper.sections(index.examples, @configuration).each do |section|
2727

2828
file.write "# #{section[:resource_name]}\n\n"
29+
file.write "#{section[:resource_explanation]}\n\n"
2930
section[:examples].sort_by!(&:description) unless configuration.keep_source_order
3031

3132
section[:examples].each do |example|

0 commit comments

Comments
 (0)