{{!--
    Renders details about a single response
    @param {Response} response a swagger response-object
--}}
{{! If global is set, attach an id to the table row }}
<div class="row">
    <div class="col-md-12">
        {{md response.description}}
    </div>
</div>
<div class="row">

    <div class="col-md-6 swagger-response-model">{{>swagger/model model=response.schema}}</div>

    {{#each response.examples}}
        <div class="col-md-6 swagger-response-examples">
            <div class="label secondary">Example for {{@key}}</div>
            {{json .}}
        </div>
    {{/each}}

    {{#if response.headers}}
        <div class="col-md-12">
            <section class="swagger-response-headers">
                <table class="table">
                    <thead>
                    <tr>
                        <th class="swagger-response-header-name"></th>
                        <th class="swagger-response-header-description"></th>
                        <th class="swagger-response-header-data-type"></th>
                    </tr>
                    </thead>
                    <tbody>
                    {{#each response.headers}}
                        {{#if $ref}}
                            {{> swagger/responseHeaderRow header=(json-schema-resolve-ref $ref) name=@key}}
                        {{else}}
                            {{> swagger/responseHeaderRow header=. name=@key}}
                        {{/if}}
                    {{/each}}
                    </tbody>
                </table>
            </section>
        </div>
    {{/if}}
</div>
