Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/api/apidoc.html
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | <h4> Request headers </h4> | ||||
<dl class="row"> | <dl class="row"> | ||||
<dt class="col col-md-2 text-right"> {{ header.name }} </dt> | <dt class="col col-md-2 text-right"> {{ header.name }} </dt> | ||||
<dd class="col col-md-9"> {{ header.doc | safe_docstring_display | safe }} </dd> | <dd class="col col-md-9"> {{ header.doc | safe_docstring_display | safe }} </dd> | ||||
</dl> | </dl> | ||||
{% endfor %} | {% endfor %} | ||||
</div> | </div> | ||||
<hr/> | <hr/> | ||||
{% endif %} | {% endif %} | ||||
{% if input_type %} | |||||
<div> | |||||
<h4> Request data </h4> | |||||
<dl class="row"> | |||||
<dt class="col col-md-2 text-right"> {{ input_type }} </dt> | |||||
<dd class="col col-md-9"> | |||||
<p> | |||||
{% if input_type == 'array' and inputs_list == '' %} | |||||
{{ inputs.0.doc | safe }} | |||||
{% elif input_type == 'array' and inputs_list != '' %} | |||||
an array of objects containing the following keys: | |||||
{% elif input_type == 'octet stream' %} | |||||
raw data as an octet stream | |||||
{% elif input_type == 'object' %} | |||||
an object containing the following keys: | |||||
{% endif %} | |||||
{% if inputs_list != '' %} | |||||
{{ inputs_list | safe_docstring_display | safe }} | |||||
{% endif %} | |||||
</p> | |||||
</dd> | |||||
</dl> | |||||
</div> | |||||
<hr/> | |||||
{% endif %} | |||||
{% if resheaders and resheaders|length > 0 %} | {% if resheaders and resheaders|length > 0 %} | ||||
<div> | <div> | ||||
<h4> Response headers </h4> | <h4> Response headers </h4> | ||||
{% for header in resheaders %} | {% for header in resheaders %} | ||||
<dl class="row"> | <dl class="row"> | ||||
<dt class="col col-md-2 text-right"> {{ header.name }} </dt> | <dt class="col col-md-2 text-right"> {{ header.name }} </dt> | ||||
<dd class="col col-md-9"> {{ header.doc | safe_docstring_display | safe }} </dd> | <dd class="col col-md-9"> {{ header.doc | safe_docstring_display | safe }} </dd> | ||||
</dl> | </dl> | ||||
{% endfor %} | {% endfor %} | ||||
</div> | </div> | ||||
<hr/> | <hr/> | ||||
{% endif %} | {% endif %} | ||||
{% if return_type %} | {% if return_type %} | ||||
<div> | <div> | ||||
<h4> Returns </h4> | <h4> Returns </h4> | ||||
<dl class="row"> | <dl class="row"> | ||||
<dt class="col col-md-2 text-right"> {{ return_type }} </dt> | <dt class="col col-md-2 text-right"> {{ return_type }} </dt> | ||||
<dd class="col col-md-9"> | <dd class="col col-md-9"> | ||||
<p> | <p> | ||||
{% if return_type == 'array' %} | {% if return_type == 'array' and returns_list == '' %} | ||||
{{ returns.0.doc | safe }} | |||||
{% elif return_type == 'array' and returns_list != '' %} | |||||
an array of objects containing the following keys: | an array of objects containing the following keys: | ||||
{% elif return_type == 'octet stream' %} | {% elif return_type == 'octet stream' %} | ||||
the raw data as an octet stream | raw data as an octet stream | ||||
{% else %} | {% elif return_type == 'object' %} | ||||
an object containing the following keys: | an object containing the following keys: | ||||
{% endif %} | {% endif %} | ||||
{% if returns_list != '' %} | |||||
{{ returns_list | safe_docstring_display | safe }} | {{ returns_list | safe_docstring_display | safe }} | ||||
{% endif %} | |||||
</p> | </p> | ||||
</dd> | </dd> | ||||
</dl> | </dl> | ||||
</div> | </div> | ||||
<hr/> | <hr/> | ||||
{% endif %} | {% endif %} | ||||
{% if status_codes and status_codes|length > 0 %} | {% if status_codes and status_codes|length > 0 %} | ||||
<div> | <div> | ||||
Show All 30 Lines |