{{!--
    Renders the parameter table within a operation definition.
    @param {Parameter[]} parameters a list of Swagger-Parameter objects
    @api public
--}}

{{#if parameters}}
    <div class="params">
        <h5>Parameters</h5>
        <table>
            {{#each parameters}}
                <tr>
                    <td class="name">
                        {{name}}
                        {{#if required}}<span class="type">Required</span>{{/if}}
			            {{#if deprecated}}<strong class="parameter-label -deprecated">DEPRECATED</strong>{{/if}}
                        {{#if examples}}<a href="#" class="example-trigger">Examples</a>{{/if}}
                    </td>
                    <td class="type">
                        {{>model/datatype . anchor='/schemas'}}
                        {{#if (isArray)}}
                            <div class="collection-format">
                                ({{#if encoding.explode}}exploded {{/if}}{{encoding.style}}-style)
                            </div>
                        {{/if}}
                    </td>
                    <td class="in">{{in}}</td>
                    <td class="desc">{{{md description}}}</td>
                </tr>
                {{#if examples}}
                    <tr class="examples">
                        <td colspan="4">
                            {{#each examples}}
                                <div class="example">
                                    {{#if name}}
                                        <p><strong>{{name}}</strong></p>
                                    {{/if}}
<pre>
{{valuePretty}}
</pre>
                                    {{#if mediaType}}
                                        <p><span class="type">{{mediaType.mediaType}}</span></p>
                                    {{/if}}
                                </div>
                            {{/each}}
                        </td>
                    </tr>
                {{/if}}
            {{/each}}
        </table>

        {{#if formParams}}
            {{#if consumes}}
            <p>{{#each consumes}}<span class="type">{{mediaType}}</span> {{/each}}</p>
            {{/if}}
        {{/if}}
    </div>
{{/if}}