Skip to content

Commit 351020a

Browse files
authored
Merge pull request #318 from TapasTech/master
Use tables to represent markdown response fields
2 parents 36293a6 + 76baff5 commit 351020a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

features/markdown_documentation.feature

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Feature: Generate Markdown documentation from test examples
164164
* [Updating an order](orders/updating_an_order.markdown)
165165
"""
166166

167-
Scenario: Example 'Getting al ist of orders' file should look like we expect
167+
Scenario: Example 'Getting a list of orders' file should look like we expect
168168
Then the file "doc/api/orders/getting_a_list_of_orders.markdown" should contain exactly:
169169
"""
170170
# Orders API
@@ -175,8 +175,9 @@ Feature: Generate Markdown documentation from test examples
175175
176176
### Response Fields
177177
178-
Name : page
179-
Description : Current page
178+
| Name | Description | Scope |
179+
|------|-------------|-------|
180+
| page | Current page | |
180181
181182
### Request
182183
@@ -276,5 +277,3 @@ Feature: Generate Markdown documentation from test examples
276277

277278
Scenario: Example 'Getting welcome message' file should be created
278279
Then a file named "doc/api/help/getting_welcome_message.markdown" should exist
279-
280-

templates/rspec_api_documentation/markdown_example.mustache

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@
2525
{{# has_response_fields? }}
2626

2727
### Response Fields
28-
{{# response_fields }}
2928

30-
Name : {{ name }}
31-
Description : {{ description }}
29+
| Name | Description | Scope |
30+
|------|-------------|-------|
31+
{{# response_fields }}
32+
| {{ name }} | {{ description }} | {{ scope }} |
3233
{{/ response_fields }}
3334

3435
{{/ has_response_fields? }}

0 commit comments

Comments
 (0)