Skip to content

Commit

Permalink
Merge pull request #170 from potomak/hide-headers-section
Browse files Browse the repository at this point in the history
Show headers section only if the associated string is present
  • Loading branch information
oestrich committed Nov 2, 2014
2 parents a282560 + 7faa088 commit 4a8c660
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions templates/rspec_api_documentation/html_example.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@
{{# requests }}
<h3>Request</h3>

<h4>Headers</h4>
<pre class="request headers">{{ request_headers_text }}</pre>
{{# request_headers_text }}
<h4>Headers</h4>
<pre class="request headers">{{ request_headers_text }}</pre>
{{/ request_headers_text }}

<h4>Route</h4>
<pre class="request route highlight">{{ request_method }} {{ request_path }}</pre>
Expand All @@ -104,8 +106,10 @@

{{# response_status }}
<h3>Response</h3>
<h4>Headers</h4>
<pre class="response headers">{{ response_headers_text }}</pre>
{{# response_headers_text }}
<h4>Headers</h4>
<pre class="response headers">{{ response_headers_text }}</pre>
{{/ response_headers_text }}
<h4>Status</h4>
<pre class="response status">{{ response_status }} {{ response_status_text}}</pre>
{{# response_body }}
Expand Down

0 comments on commit 4a8c660

Please sign in to comment.