Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Commit

Permalink
fix link doc template (#537) (#582)
Browse files Browse the repository at this point in the history
Fix doc template so that required parameters are shown correctly as such for Request Body fields. See #537.
  • Loading branch information
tuzepoito authored and tomchristie committed Jun 14, 2018
1 parent 50a4665 commit 9a034dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apistar/templates/docs/layout/link.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h4>Request Body</h4>
<tbody>
{% if expanded %}
{% for key, schema in expanded.items() %}
<tr><td class="parameter-name"><code>{{ key }}</code>{% if key in expanded.required %} <span class="label label-warning">required</span>{% endif %}</td><td>{% if schema.description %}{{ schema.description }}{% endif %}</td></tr>
<tr><td class="parameter-name"><code>{{ key }}</code>{% if key in field.schema.required %} <span class="label label-warning">required</span>{% endif %}</td><td>{% if schema.description %}{{ schema.description }}{% endif %}</td></tr>
{% endfor %}
{% else %}
<tr><td class="parameter-name"><code>{{ field.name }}</code>{% if field.required %} <span class="label label-warning">required</span>{% endif %}</td><td>{% if field.description or field.schema.description %}{{ field.description or field.schema.description }}{% endif %}</td></tr>
Expand Down

0 comments on commit 9a034dd

Please sign in to comment.