Responses
{% for response in method[1].responses %}
{{ response[0] }}
{{ response[1].description }}
{% if response[1].schema.properties %}
Name |
Format |
Type |
{% for parameter in response[1].schema.properties %}
{{ parameter[0] }} |
{% if parameter[1].format %}
{{ parameter[1].format }}
{% else %}
Object
{% endif %}
|
{{ parameter[1].type }} |
{% endfor %}
{% endif %}
{% for content_type in swagger.produces %}
{% if response[1].examples[content_type] %}
{% assign example = response[1].examples[content_type] %}
{% if content_type contains 'json' %}
{% highlight json %}{{ example }}{% endhighlight %}
{% elsif content_type contains 'xml' %}
{% highlight xml %}{{ example }}{% endhighlight %}
{% else %}
{% highlight http %}{{ example }}{% endhighlight %}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}