<% var responseTemplate = _.template( $( "#response-template" ).html() ); var paramTemplate = _.template( $( "#parameter-template" ).html() ); %>
" class="method-panel panel panel-info">

<%=key%> " aria-expanded="false" aria-controls="panel_<%=method["x-resourceId"]%>">

" class="collapse panel-body">
<% if( !_.isUndefined( method.description ) ){ %>

Description:

<%= method.description.replace(/(?:\r\n|\r|\n)/g, '
') %>


<% } %> <% if( !_.isUndefined( method.operationId ) ){ %>

Internal Operation: (e.g. Handler.Action)

<%= method.operationId %>
<% } %> <% if( !_.isUndefined( method.parameters ) && method.parameters.length > 0 ){ %>

Parameters:

<%= paramTemplate( {"entity":method} ) %>
<% } %> <%= renderXAttributes( method, 'h4' ) %> <% if( _.keys( method.responses ).length ) { %>

Responses:

<% _.each( _.keys(method.responses), function( responseKey ){ if( !isNaN( responseKey ) || responseKey === 'default' ){ %> <%= responseTemplate( { "resourceId": method["x-resourceId"] , "path":key, "key":responseKey, "response":method.responses[ responseKey ] } ) %> <% } }); %> <% } %> <% if( !_.isUndefined( method[ "x-request-samples" ] ) ) { var tabIds = {}; var tabActivated = false; %>

Sample Responses:

<%= method[ "x-request-samples" ].description %>

<% _.each( method[ "x-request-samples" ].examples, function( example, mimetype ){ typeRef = mimetype.split('/')[ mimetype.split( '/' ).length-1 ]; if( typeRef === 'json' ) typeRef = 'javascript'; %>
<%= formatAPIExample( example, mimetype ) %>
<% tabActivated = true; }); %>
<% } %>