<% var schemaTemplate = _.template( $( "#schema-template" ).html() ); var exampleTemplate = _.template( $( "#example-template" ).html() ); var typeRef; %>

<%=key%>

<% if( !_.isUndefined( response.description ) ){ %>

Description:

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


<% } %>
<% if( !_.isUndefined( response.schema ) || !_.isUndefined( response.examples ) ){ var tabIds = {}; %>

Schema and Examples:

<% if( !_.isUndefined( response.schema ) ){ %>
<%= schemaTemplate( { "entity": response } ) %>
<% } %> <% if( !_.isUndefined( response.examples ) ) { %> <% _.each( response.examples, function( example, mimetype ){ typeRef = mimetype.split('/')[ mimetype.split( '/' ).length-1 ]; if( typeRef === 'json' ) typeRef = 'javascript'; %>
<%= formatAPIExample( example, mimetype ) %>
<% }); %> <% } %>
<% } %>