Skip to content

Commit

Permalink
Merge pull request #318 from TapasTech/master
Browse files Browse the repository at this point in the history
Use tables to represent markdown response fields
  • Loading branch information
oestrich authored Jan 25, 2017
2 parents 36293a6 + 76baff5 commit 351020a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 4 additions & 5 deletions features/markdown_documentation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Feature: Generate Markdown documentation from test examples
* [Updating an order](orders/updating_an_order.markdown)
"""

Scenario: Example 'Getting al ist of orders' file should look like we expect
Scenario: Example 'Getting a list of orders' file should look like we expect
Then the file "doc/api/orders/getting_a_list_of_orders.markdown" should contain exactly:
"""
# Orders API
Expand All @@ -175,8 +175,9 @@ Feature: Generate Markdown documentation from test examples
### Response Fields
Name : page
Description : Current page
| Name | Description | Scope |
|------|-------------|-------|
| page | Current page | |
### Request
Expand Down Expand Up @@ -276,5 +277,3 @@ Feature: Generate Markdown documentation from test examples

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


7 changes: 4 additions & 3 deletions templates/rspec_api_documentation/markdown_example.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
{{# has_response_fields? }}

### Response Fields
{{# response_fields }}

Name : {{ name }}
Description : {{ description }}
| Name | Description | Scope |
|------|-------------|-------|
{{# response_fields }}
| {{ name }} | {{ description }} | {{ scope }} |
{{/ response_fields }}

{{/ has_response_fields? }}
Expand Down

0 comments on commit 351020a

Please sign in to comment.