目前沒有簡單的方法可以做到這一點,因爲'描述'列是在模板級設置的。看到這個template。
爲了能夠做到這一點,你需要定製rest_framework /文檔/ link.html一個更好的方式,也許有一個模板標籤在這裏檢查自定義標誌:
{% elif link.fields|with_location:'form' %}
<h4>Request Body</h4>
<p>The request body should be a <code>"{{ link.encoding }}"</code> encoded object, containing the following items.</p>
<table class="parameters table table-bordered table-striped">
<thead>
<tr><th>Parameter</th><th>Description</th></tr>
</thead>
<tbody>
{% for field in link.fields|with_location:'form' %}
<tr><td class="parameter-name"><code>{{ field.name }}</code>{% if field.required %} <span class="label label-warning">required</span>{% endif %}</td><td>{% if field.schema.description %}{{ field.schema.description }}{% endif %}</td></tr>
{% endfor %}
</tbody>
</table>
{% endif %}
但我認爲這是太多的考慮只是爲了刪除該列。