Skip to content

Commit

Permalink
fix link doc template (encode#537)
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 encode#537.
  • Loading branch information
tuzepoito committed Jun 7, 2018
1 parent 33f9f61 commit ba9e152
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 ba9e152

Please sign in to comment.