Conflicts: dist/index.html dist/swagger-ui.js dist/swagger-ui.min.js src/main/coffeescript/view/MainView.coffee src/main/coffeescript/view/OperationView.coffee src/main/coffeescript/view/ParameterView.coffee src/main/coffeescript/view/ResourceView.coffee src/main/coffeescript/view/SignatureView.coffee src/main/html/index.html
2 lines
60 KiB
JavaScript
2 lines
60 KiB
JavaScript
(function(){"use strict";window.SwaggerUi=Backbone.Router.extend({dom_id:"swagger_ui",options:null,api:null,headerView:null,mainView:null,initialize:function(e){e=e||{},e.dom_id&&(this.dom_id=e.dom_id,delete e.dom_id),e.supportedSubmitMethods||(e.supportedSubmitMethods=["get","put","post","delete","head","options","patch"]),$("#"+this.dom_id).length||$("body").append('<div id="'+this.dom_id+'"></div>'),this.options=e,marked.setOptions({gfm:!0});var n=this;this.options.success=function(){return n.render()},this.options.progress=function(e){return n.showMessage(e)},this.options.failure=function(e){return n.onLoadFailure(e)},this.headerView=new SwaggerUi.Views.HeaderView({el:$("#header")}),this.headerView.on("update-swagger-ui",function(e){return n.updateSwaggerUi(e)})},setOption:function(e,n){this.options[e]=n},getOption:function(e){return this.options[e]},updateSwaggerUi:function(e){this.options.url=e.url,this.load()},load:function(){this.mainView&&this.mainView.clear();var e=this.options.url;e&&0!==e.indexOf("http")&&(e=this.buildUrl(window.location.href.toString(),e)),this.options.url=e,this.headerView.update(e),this.api=new SwaggerClient(this.options)},collapseAll:function(){Docs.collapseEndpointListForResource("")},listAll:function(){Docs.collapseOperationsForResource("")},expandAll:function(){Docs.expandOperationsForResource("")},render:function(){switch(this.showMessage("Finished Loading Resource Information. Rendering Swagger UI..."),this.mainView=new SwaggerUi.Views.MainView({model:this.api,el:$("#"+this.dom_id),swaggerOptions:this.options,router:this}).render(),this.showMessage(),this.options.docExpansion){case"full":this.expandAll();break;case"list":this.listAll()}this.renderGFM(),this.options.onComplete&&this.options.onComplete(this.api,this),setTimeout(Docs.shebang.bind(this),100)},buildUrl:function(e,n){if(0===n.indexOf("/")){var t=e.split("/");return e=t[0]+"//"+t[2],e+n}var a=e.length;return e.indexOf("?")>-1&&(a=Math.min(a,e.indexOf("?"))),e.indexOf("#")>-1&&(a=Math.min(a,e.indexOf("#"))),e=e.substring(0,a),-1!==e.indexOf("/",e.length-1)?e+n:e+"/"+n},showMessage:function(e){void 0===e&&(e=""),$("#message-bar").removeClass("message-fail"),$("#message-bar").addClass("message-success"),$("#message-bar").html(e)},onLoadFailure:function(e){void 0===e&&(e=""),$("#message-bar").removeClass("message-success"),$("#message-bar").addClass("message-fail");var n=$("#message-bar").html(e);return this.options.onFailure&&this.options.onFailure(e),n},renderGFM:function(){$(".markdown").each(function(){$(this).html(marked($(this).html()))})}}),window.SwaggerUi.Views={},function(){function e(e){"console"in window&&"function"==typeof window.console.warn&&console.warn(e)}window.authorizations={add:function(){if(e("using window.authorizations is depreciated. Please use waggerUi.api.clientAuthorizations.add()."),"undefined"==typeof window.swaggerUi)throw new TypeError("window.swaggerUi is not defined");window.swaggerUi instanceof SwaggerUi&&window.swaggerUi.api.clientAuthorizations.add.apply(window.swaggerUi.api.clientAuthorizations,arguments)}},window.ApiKeyAuthorization=function(){e("window.ApiKeyAuthorization is depreciated. Please use SwaggerClient.ApiKeyAuthorization."),SwaggerClient.ApiKeyAuthorization.apply(window,arguments)},window.PasswordAuthorization=function(){e("window.PasswordAuthorization is depreciated. Please use SwaggerClient.PasswordAuthorization."),SwaggerClient.PasswordAuthorization.apply(window,arguments)}}(),this.Handlebars=this.Handlebars||{},this.Handlebars.templates=this.Handlebars.templates||{},this.Handlebars.templates.apikey_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return"<!--div class='auth_button' id='apikey_button'><img class='auth_icon' alt='apply api key' src='images/apikey.jpeg'></div-->\n<div class='auth_container' id='apikey_container'>\n <div class='key_input_container'>\n <div class='auth_label'>"+r((i=null!=(i=n.keyName||(null!=e?e.keyName:e))?i:l,typeof i===s?i.call(e,{name:"keyName",hash:{},data:a}):i))+'</div>\n <input placeholder="api_key" class="auth_input" id="input_apiKey_entry" name="apiKey" type="text"/>\n <div class=\'auth_submit\'><a class=\'auth_submit_button\' id="apply_api_key" href="#">apply</a></div>\n </div>\n</div>\n\n'},useData:!0}),this.Handlebars.templates.basic_auth_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(){return'<div class=\'auth_button\' id=\'basic_auth_button\'><img class=\'auth_icon\' src=\'images/password.jpeg\'></div>\n<div class=\'auth_container\' id=\'basic_auth_container\'>\n <div class=\'key_input_container\'>\n <div class="auth_label">Username</div>\n <input placeholder="username" class="auth_input" id="input_username" name="username" type="text"/>\n <div class="auth_label">Password</div>\n <input placeholder="password" class="auth_input" id="input_password" name="password" type="password"/>\n <div class=\'auth_submit\'><a class=\'auth_submit_button\' id="apply_basic_auth" href="#">apply</a></div>\n </div>\n</div>\n\n'},useData:!0}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,n,t,a){var i,s="";return i=n.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=i&&(s+=i),s},2:function(e){var n,t=this.lambda,a=' <option value="';return n=t(e,e),null!=n&&(a+=n),a+='">',n=t(e,e),null!=n&&(a+=n),a+"</option>\n"},4:function(){return' <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s='<label for="contentType"></label>\n<select name="contentType">\n';return i=n["if"].call(e,null!=e?e.produces:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(4,a),data:a}),null!=i&&(s+=i),s+"</select>\n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),n=$(this).parent().height(),t=(n-e)/2;$(this).css("margin-top",t)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),n=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),t=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-n-t)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""===$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call),window.Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:var n="resource_"+e[0];Docs.expandEndpointListForResource(e[0]),$("#"+n).slideto({highlight:!1});break;case 2:Docs.expandEndpointListForResource(e[0]),$("#"+n).slideto({highlight:!1});var t=e.join("_"),a=t+"_content";Docs.expandOperation($("#"+a)),$("#"+t).slideto({highlight:!1})}},toggleEndpointListForResource:function(e){var n=$("li#resource_"+Docs.escapeResourceName(e)+" ul.endpoints");n.is(":visible")?Docs.collapseEndpointListForResource(e):Docs.expandEndpointListForResource(e)},expandEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideDown();$("li#resource_"+e).addClass("active");var n=$("li#resource_"+e+" ul.endpoints");n.slideDown()},collapseEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideUp();$("li#resource_"+e).removeClass("active");var n=$("li#resource_"+e+" ul.endpoints");n.slideUp()},expandOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideDown():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideUp():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(e){return e.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(e){e.slideDown()},collapseOperation:function(e){e.slideUp()}},Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""),new Handlebars.SafeString(e)}),this.Handlebars.templates.main=Handlebars.template({1:function(e,n,t,a){var i,s=this.lambda,l=this.escapeExpression,r=' <div class="info_title">'+l(s(null!=(i=null!=e?e.info:e)?i.title:i,e))+'</div>\n <div class="info_description markdown">';return i=s(null!=(i=null!=e?e.info:e)?i.description:i,e),null!=i&&(r+=i),r+="</div>\n",i=n["if"].call(e,null!=e?e.externalDocs:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=i&&(r+=i),r+=" ",i=n["if"].call(e,null!=(i=null!=e?e.info:e)?i.termsOfServiceUrl:i,{name:"if",hash:{},fn:this.program(4,a),inverse:this.noop,data:a}),null!=i&&(r+=i),r+="\n ",i=n["if"].call(e,null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.name:i,{name:"if",hash:{},fn:this.program(6,a),inverse:this.noop,data:a}),null!=i&&(r+=i),r+="\n ",i=n["if"].call(e,null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.url:i,{name:"if",hash:{},fn:this.program(8,a),inverse:this.noop,data:a}),null!=i&&(r+=i),r+="\n ",i=n["if"].call(e,null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.email:i,{name:"if",hash:{},fn:this.program(10,a),inverse:this.noop,data:a}),null!=i&&(r+=i),r+="\n ",i=n["if"].call(e,null!=(i=null!=e?e.info:e)?i.license:i,{name:"if",hash:{},fn:this.program(12,a),inverse:this.noop,data:a}),null!=i&&(r+=i),r+"\n"},2:function(e){var n,t=this.lambda,a=this.escapeExpression;return" <h5>More documentations</h5>\n <p>"+a(t(null!=(n=null!=e?e.externalDocs:e)?n.description:n,e))+'</p>\n <a href="'+a(t(null!=(n=null!=e?e.externalDocs:e)?n.url:n,e))+'" target="_blank">'+a(t(null!=(n=null!=e?e.externalDocs:e)?n.url:n,e))+"</a>\n"},4:function(e){var n,t=this.lambda,a=this.escapeExpression;return'<div class="info_tos"><a href="'+a(t(null!=(n=null!=e?e.info:e)?n.termsOfServiceUrl:n,e))+'">Terms of service</a></div>'},6:function(e){var n,t=this.lambda,a=this.escapeExpression;return"<div class='info_name'>Created by "+a(t(null!=(n=null!=(n=null!=e?e.info:e)?n.contact:n)?n.name:n,e))+"</div>"},8:function(e){var n,t=this.lambda,a=this.escapeExpression;return"<div class='info_url'>See more at <a href=\""+a(t(null!=(n=null!=(n=null!=e?e.info:e)?n.contact:n)?n.url:n,e))+'">'+a(t(null!=(n=null!=(n=null!=e?e.info:e)?n.contact:n)?n.url:n,e))+"</a></div>"},10:function(e){var n,t=this.lambda,a=this.escapeExpression;return"<div class='info_email'><a href=\"mailto:"+a(t(null!=(n=null!=(n=null!=e?e.info:e)?n.contact:n)?n.email:n,e))+"?subject="+a(t(null!=(n=null!=e?e.info:e)?n.title:n,e))+'">Contact the developer</a></div>'},12:function(e){var n,t=this.lambda,a=this.escapeExpression;return"<div class='info_license'><a href='"+a(t(null!=(n=null!=(n=null!=e?e.info:e)?n.license:n)?n.url:n,e))+"'>"+a(t(null!=(n=null!=(n=null!=e?e.info:e)?n.license:n)?n.name:n,e))+"</a></div>"},14:function(e){var n,t=this.lambda,a=this.escapeExpression;return' , <span style="font-variant: small-caps">api version</span>: '+a(t(null!=(n=null!=e?e.info:e)?n.version:n,e))+"\n "},16:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return' <span style="float:right"><a href="'+r((i=null!=(i=n.validatorUrl||(null!=e?e.validatorUrl:e))?i:l,typeof i===s?i.call(e,{name:"validatorUrl",hash:{},data:a}):i))+"/debug?url="+r((i=null!=(i=n.url||(null!=e?e.url:e))?i:l,typeof i===s?i.call(e,{name:"url",hash:{},data:a}):i))+'"><img id="validator" src="'+r((i=null!=(i=n.validatorUrl||(null!=e?e.validatorUrl:e))?i:l,typeof i===s?i.call(e,{name:"validatorUrl",hash:{},data:a}):i))+"?url="+r((i=null!=(i=n.url||(null!=e?e.url:e))?i:l,typeof i===s?i.call(e,{name:"url",hash:{},data:a}):i))+'"></a>\n </span>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s,l="function",r=n.helperMissing,o=this.escapeExpression,u="<div class='info' id='api_info'>\n";return i=n["if"].call(e,null!=e?e.info:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+="</div>\n<div class='container' id='resources_container'>\n <ul id='resources'></ul>\n\n <div class=\"footer\">\n <br>\n <br>\n <h4 style=\"color: #999\">[ <span style=\"font-variant: small-caps\">base url</span>: "+o((s=null!=(s=n.basePath||(null!=e?e.basePath:e))?s:r,typeof s===l?s.call(e,{name:"basePath",hash:{},data:a}):s))+"\n",i=n["if"].call(e,null!=(i=null!=e?e.info:e)?i.version:i,{name:"if",hash:{},fn:this.program(14,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+="]\n",i=n["if"].call(e,null!=e?e.validatorUrl:e,{name:"if",hash:{},fn:this.program(16,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+" </h4>\n </div>\n</div>\n"},useData:!0}),this.Handlebars.templates.operation=Handlebars.template({1:function(){return"deprecated"},3:function(){return" <h4>Warning: Deprecated</h4>\n"},5:function(e,n,t,a){var i,s,l="function",r=n.helperMissing,o=' <h4>Implementation Notes</h4>\n <div class="markdown">';return s=null!=(s=n.description||(null!=e?e.description:e))?s:r,i=typeof s===l?s.call(e,{name:"description",hash:{},data:a}):s,null!=i&&(o+=i),o+"</div>\n"},7:function(){return' <div class="auth">\n <span class="api-ic ic-error"></span>'},9:function(e,n,t,a){var i,s=' <div id="api_information_panel" style="top: 526px; left: 776px; display: none;">\n';return i=n.each.call(e,e,{name:"each",hash:{},fn:this.program(10,a),inverse:this.noop,data:a}),null!=i&&(s+=i),s+" </div>\n"},10:function(e){var n,t=this.lambda,a=this.escapeExpression,i=" <div title='";return n=t(null!=e?e.description:e,e),null!=n&&(i+=n),i+"'>"+a(t(null!=e?e.scope:e,e))+"</div>\n"},12:function(){return"</div>"},14:function(){return' <div class=\'access\'>\n <span class="api-ic ic-off" title="click to authenticate"></span>\n </div>\n'},16:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" <h4>Response Class (Status "+r((i=null!=(i=n.successCode||(null!=e?e.successCode:e))?i:l,typeof i===s?i.call(e,{name:"successCode",hash:{},data:a}):i))+')</h4>\n <p><span class="model-signature" /></p>\n <br/>\n <div class="response-content-type" />\n'},18:function(){return' <h4>Parameters</h4>\n <table class=\'fullwidth\'>\n <thead>\n <tr>\n <th style="width: 100px; max-width: 100px">Parameter</th>\n <th style="width: 310px; max-width: 310px">Value</th>\n <th style="width: 200px; max-width: 200px">Description</th>\n <th style="width: 100px; max-width: 100px">Parameter Type</th>\n <th style="width: 220px; max-width: 230px">Data Type</th>\n </tr>\n </thead>\n <tbody class="operation-params">\n\n </tbody>\n </table>\n'},20:function(){return" <div style='margin:0;padding:0;display:inline'></div>\n <h4>Response Messages</h4>\n <table class='fullwidth'>\n <thead>\n <tr>\n <th>HTTP Status Code</th>\n <th>Reason</th>\n <th>Response Model</th>\n <th>Headers</th>\n </tr>\n </thead>\n <tbody class=\"operation-status\">\n\n </tbody>\n </table>\n"},22:function(){return""},24:function(){return" <div class='sandbox_header'>\n <input class='submit' name='commit' type='button' value='Try it out!' />\n <a href='#' class='response_hider' style='display:none'>Hide Response</a>\n <span class='response_throbber' style='display:none'></span>\n </div>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s,l,r="function",o=n.helperMissing,u=this.escapeExpression,d=n.blockHelperMissing,p="\n <ul class='operations' >\n <li class='"+u((s=null!=(s=n.method||(null!=e?e.method:e))?s:o,typeof s===r?s.call(e,{name:"method",hash:{},data:a}):s))+" operation' id='"+u((s=null!=(s=n.parentId||(null!=e?e.parentId:e))?s:o,typeof s===r?s.call(e,{name:"parentId",hash:{},data:a}):s))+"_"+u((s=null!=(s=n.nickname||(null!=e?e.nickname:e))?s:o,typeof s===r?s.call(e,{name:"nickname",hash:{},data:a}):s))+"'>\n <div class='heading'>\n <h3>\n <span class='http_method'>\n <a href='#!/"+u((s=null!=(s=n.encodedParentId||(null!=e?e.encodedParentId:e))?s:o,typeof s===r?s.call(e,{name:"encodedParentId",hash:{},data:a}):s))+"/"+u((s=null!=(s=n.nickname||(null!=e?e.nickname:e))?s:o,typeof s===r?s.call(e,{name:"nickname",hash:{},data:a}):s))+'\' class="toggleOperation">'+u((s=null!=(s=n.method||(null!=e?e.method:e))?s:o,typeof s===r?s.call(e,{name:"method",hash:{},data:a}):s))+"</a>\n </span>\n <span class='path'>\n <a href='#!/"+u((s=null!=(s=n.encodedParentId||(null!=e?e.encodedParentId:e))?s:o,typeof s===r?s.call(e,{name:"encodedParentId",hash:{},data:a}):s))+"/"+u((s=null!=(s=n.nickname||(null!=e?e.nickname:e))?s:o,typeof s===r?s.call(e,{name:"nickname",hash:{},data:a}):s))+"' class=\"toggleOperation ";return i=n["if"].call(e,null!=e?e.deprecated:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=i&&(p+=i),p+='">'+u((s=null!=(s=n.path||(null!=e?e.path:e))?s:o,typeof s===r?s.call(e,{name:"path",hash:{},data:a}):s))+"</a>\n </span>\n </h3>\n <ul class='options'>\n <li>\n <a href='#!/"+u((s=null!=(s=n.encodedParentId||(null!=e?e.encodedParentId:e))?s:o,typeof s===r?s.call(e,{name:"encodedParentId",hash:{},data:a}):s))+"/"+u((s=null!=(s=n.nickname||(null!=e?e.nickname:e))?s:o,typeof s===r?s.call(e,{name:"nickname",hash:{},data:a}):s))+'\' class="toggleOperation">',s=null!=(s=n.summary||(null!=e?e.summary:e))?s:o,i=typeof s===r?s.call(e,{name:"summary",hash:{},data:a}):s,null!=i&&(p+=i),p+="</a>\n </li>\n </ul>\n </div>\n <div class='content' id='"+u((s=null!=(s=n.parentId||(null!=e?e.parentId:e))?s:o,typeof s===r?s.call(e,{name:"parentId",hash:{},data:a}):s))+"_"+u((s=null!=(s=n.nickname||(null!=e?e.nickname:e))?s:o,typeof s===r?s.call(e,{name:"nickname",hash:{},data:a}):s))+"_content' style='display:none'>\n",i=n["if"].call(e,null!=e?e.deprecated:e,{name:"if",hash:{},fn:this.program(3,a),inverse:this.noop,data:a}),null!=i&&(p+=i),i=n["if"].call(e,null!=e?e.description:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.noop,data:a}),null!=i&&(p+=i),s=null!=(s=n.oauth||(null!=e?e.oauth:e))?s:o,l={name:"oauth",hash:{},fn:this.program(7,a),inverse:this.noop,data:a},i=typeof s===r?s.call(e,l):s,n.oauth||(i=d.call(e,i,l)),null!=i&&(p+=i),p+="\n",i=n.each.call(e,null!=e?e.oauth:e,{name:"each",hash:{},fn:this.program(9,a),inverse:this.noop,data:a}),null!=i&&(p+=i),p+=" ",s=null!=(s=n.oauth||(null!=e?e.oauth:e))?s:o,l={name:"oauth",hash:{},fn:this.program(12,a),inverse:this.noop,data:a},i=typeof s===r?s.call(e,l):s,n.oauth||(i=d.call(e,i,l)),null!=i&&(p+=i),p+="\n",s=null!=(s=n.oauth||(null!=e?e.oauth:e))?s:o,l={name:"oauth",hash:{},fn:this.program(14,a),inverse:this.noop,data:a},i=typeof s===r?s.call(e,l):s,n.oauth||(i=d.call(e,i,l)),null!=i&&(p+=i),i=n["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(16,a),inverse:this.noop,data:a}),null!=i&&(p+=i),p+=" <form accept-charset='UTF-8' class='sandbox'>\n <div style='margin:0;padding:0;display:inline'></div>\n",i=n["if"].call(e,null!=e?e.parameters:e,{name:"if",hash:{},fn:this.program(18,a),inverse:this.noop,data:a}),null!=i&&(p+=i),i=n["if"].call(e,null!=e?e.responseMessages:e,{name:"if",hash:{},fn:this.program(20,a),inverse:this.noop,data:a}),null!=i&&(p+=i),i=n["if"].call(e,null!=e?e.isReadOnly:e,{name:"if",hash:{},fn:this.program(22,a),inverse:this.program(24,a),data:a}),null!=i&&(p+=i),p+" </form>\n <div class='response' style='display:none'>\n <h4>Request URL</h4>\n <div class='block request_url'></div>\n <h4>Response Body</h4>\n <div class='block response_body'></div>\n <h4>Response Code</h4>\n <div class='block response_code'></div>\n <h4>Response Headers</h4>\n <div class='block response_headers'></div>\n </div>\n </div>\n </li>\n </ul>\n"},useData:!0}),this.Handlebars.templates.param=Handlebars.template({1:function(e,n,t,a){var i,s="";return i=n["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.program(4,a),data:a}),null!=i&&(s+=i),s},2:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return' <input type="file" name=\''+r((i=null!=(i=n.name||(null!=e?e.name:e))?i:l,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+'\'/>\n <div class="parameter-content-type" />\n'},4:function(e,n,t,a){var i,s="";return i=n["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.program(7,a),data:a}),null!=i&&(s+=i),s},5:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" <div class=\"editor_holder\"></div>\n <textarea class='body-textarea' name='"+r((i=null!=(i=n.name||(null!=e?e.name:e))?i:l,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"'>"+r((i=null!=(i=n["default"]||(null!=e?e["default"]:e))?i:l,typeof i===s?i.call(e,{name:"default",hash:{},data:a}):i))+'</textarea>\n <br />\n <div class="parameter-content-type" />\n'},7:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" <textarea class='body-textarea' name='"+r((i=null!=(i=n.name||(null!=e?e.name:e))?i:l,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+'\'></textarea>\n <div class="editor_holder"></div>\n <br />\n <div class="parameter-content-type" />\n'},9:function(e,n,t,a){var i,s="";return i=n["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.program(10,a),data:a}),null!=i&&(s+=i),s},10:function(e,n,t,a){var i,s="";return i=n["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(11,a),inverse:this.program(13,a),data:a}),null!=i&&(s+=i),s},11:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" <input class='parameter' minlength='0' name='"+r((i=null!=(i=n.name||(null!=e?e.name:e))?i:l,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"' placeholder='' type='text' value='"+r((i=null!=(i=n["default"]||(null!=e?e["default"]:e))?i:l,typeof i===s?i.call(e,{name:"default",hash:{},data:a}):i))+"'/>\n"},13:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" <input class='parameter' minlength='0' name='"+r((i=null!=(i=n.name||(null!=e?e.name:e))?i:l,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"' placeholder='' type='text' value=''/>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s,l="function",r=n.helperMissing,o=this.escapeExpression,u="<td class='code'>"+o((s=null!=(s=n.name||(null!=e?e.name:e))?s:r,typeof s===l?s.call(e,{name:"name",hash:{},data:a}):s))+"</td>\n<td>\n\n";return i=n["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(9,a),data:a}),null!=i&&(u+=i),u+='\n</td>\n<td class="markdown">',s=null!=(s=n.description||(null!=e?e.description:e))?s:r,i=typeof s===l?s.call(e,{name:"description",hash:{},data:a}):s,null!=i&&(u+=i),u+="</td>\n<td>",s=null!=(s=n.paramType||(null!=e?e.paramType:e))?s:r,i=typeof s===l?s.call(e,{name:"paramType",hash:{},data:a}):s,null!=i&&(u+=i),u+'</td>\n<td>\n <span class="model-signature"></span>\n</td>\n'},useData:!0}),this.Handlebars.templates.param_list=Handlebars.template({1:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return"<td class='code required'>"+r((i=null!=(i=n.name||(null!=e?e.name:e))?i:l,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"</td>\n"},3:function(){return" multiple='multiple'"},5:function(){return""},7:function(e,n,t,a){var i,s="";return i=n["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.program(8,a),data:a}),null!=i&&(s+=i),s},8:function(e,n,t,a){var i,s=n.helperMissing,l="";return i=(n.isArray||e&&e.isArray||s).call(e,e,{name:"isArray",hash:{},fn:this.program(5,a),inverse:this.program(9,a),data:a}),null!=i&&(l+=i),l},9:function(){return" <option selected=\"\" value=''></option>\n"},11:function(e,n,t,a){var i,s="";return i=n["if"].call(e,null!=e?e.isDefault:e,{name:"if",hash:{},fn:this.program(12,a),inverse:this.program(14,a),data:a}),null!=i&&(s+=i),s},12:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return' <option selected="" value=\''+r((i=null!=(i=n.value||(null!=e?e.value:e))?i:l,typeof i===s?i.call(e,{name:"value",hash:{},data:a}):i))+"'>"+r((i=null!=(i=n.value||(null!=e?e.value:e))?i:l,typeof i===s?i.call(e,{name:"value",hash:{},data:a}):i))+" (default)</option>\n"},14:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" <option value='"+r((i=null!=(i=n.value||(null!=e?e.value:e))?i:l,typeof i===s?i.call(e,{name:"value",hash:{},data:a}):i))+"'>"+r((i=null!=(i=n.value||(null!=e?e.value:e))?i:l,typeof i===s?i.call(e,{name:"value",hash:{},data:a}):i))+"</option>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s,l="function",r=n.helperMissing,o=this.escapeExpression,u="";return i=n["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+="<td class='code'>"+o((s=null!=(s=n.name||(null!=e?e.name:e))?s:r,typeof s===l?s.call(e,{name:"name",hash:{},data:a}):s))+"</td>\n<td>\n <select ",i=(n.isArray||e&&e.isArray||r).call(e,e,{name:"isArray",hash:{},fn:this.program(3,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+=" class='parameter' name='"+o((s=null!=(s=n.name||(null!=e?e.name:e))?s:r,typeof s===l?s.call(e,{name:"name",hash:{},data:a}):s))+"'>\n",i=n["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.program(7,a),data:a}),null!=i&&(u+=i),i=n.each.call(e,null!=(i=null!=e?e.allowableValues:e)?i.descriptiveValues:i,{name:"each",hash:{},fn:this.program(11,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+=' </select>\n</td>\n<td class="markdown">',s=null!=(s=n.description||(null!=e?e.description:e))?s:r,i=typeof s===l?s.call(e,{name:"description",hash:{},data:a}):s,null!=i&&(u+=i),u+="</td>\n<td>",s=null!=(s=n.paramType||(null!=e?e.paramType:e))?s:r,i=typeof s===l?s.call(e,{name:"paramType",hash:{},data:a}):s,null!=i&&(u+=i),u+'</td>\n<td><span class="model-signature"></span></td>'},useData:!0}),this.Handlebars.templates.param_readonly=Handlebars.template({1:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" <textarea class='body-textarea' readonly='readonly' name='"+r((i=null!=(i=n.name||(null!=e?e.name:e))?i:l,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"'>"+r((i=null!=(i=n["default"]||(null!=e?e["default"]:e))?i:l,typeof i===s?i.call(e,{name:"default",hash:{},data:a}):i))+"</textarea>\n"},3:function(e,n,t,a){var i,s="";return i=n["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,a),inverse:this.program(6,a),data:a}),null!=i&&(s+=i),s},4:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" "+r((i=null!=(i=n["default"]||(null!=e?e["default"]:e))?i:l,typeof i===s?i.call(e,{name:"default",hash:{},data:a}):i))+"\n"},6:function(){return" (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s,l="function",r=n.helperMissing,o=this.escapeExpression,u="<td class='code'>"+o((s=null!=(s=n.name||(null!=e?e.name:e))?s:r,typeof s===l?s.call(e,{name:"name",hash:{},data:a}):s))+"</td>\n<td>\n";return i=n["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(3,a),data:a}),null!=i&&(u+=i),u+='</td>\n<td class="markdown">',s=null!=(s=n.description||(null!=e?e.description:e))?s:r,i=typeof s===l?s.call(e,{name:"description",hash:{},data:a}):s,null!=i&&(u+=i),u+="</td>\n<td>",s=null!=(s=n.paramType||(null!=e?e.paramType:e))?s:r,i=typeof s===l?s.call(e,{name:"paramType",hash:{},data:a}):s,null!=i&&(u+=i),u+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.param_readonly_required=Handlebars.template({1:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='"+r((i=null!=(i=n.name||(null!=e?e.name:e))?i:l,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"'>"+r((i=null!=(i=n["default"]||(null!=e?e["default"]:e))?i:l,typeof i===s?i.call(e,{name:"default",hash:{},data:a}):i))+"</textarea>\n"},3:function(e,n,t,a){var i,s="";return i=n["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,a),inverse:this.program(6,a),data:a}),null!=i&&(s+=i),s},4:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" "+r((i=null!=(i=n["default"]||(null!=e?e["default"]:e))?i:l,typeof i===s?i.call(e,{name:"default",hash:{},data:a}):i))+"\n"},6:function(){return" (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s,l="function",r=n.helperMissing,o=this.escapeExpression,u="<td class='code required'>"+o((s=null!=(s=n.name||(null!=e?e.name:e))?s:r,typeof s===l?s.call(e,{name:"name",hash:{},data:a}):s))+"</td>\n<td>\n";return i=n["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(3,a),data:a}),null!=i&&(u+=i),u+='</td>\n<td class="markdown">',s=null!=(s=n.description||(null!=e?e.description:e))?s:r,i=typeof s===l?s.call(e,{name:"description",hash:{},data:a}):s,null!=i&&(u+=i),u+="</td>\n<td>",s=null!=(s=n.paramType||(null!=e?e.paramType:e))?s:r,i=typeof s===l?s.call(e,{name:"paramType",hash:{},data:a}):s,null!=i&&(u+=i),u+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.param_required=Handlebars.template({1:function(e,n,t,a){var i,s="";return i=n["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.program(4,a),data:a}),null!=i&&(s+=i),s},2:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return' <input type="file" name=\''+r((i=null!=(i=n.name||(null!=e?e.name:e))?i:l,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"'/>\n"},4:function(e,n,t,a){var i,s="";return i=n["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.program(7,a),data:a}),null!=i&&(s+=i),s},5:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" <textarea class='body-textarea required' placeholder='(required)' name='"+r((i=null!=(i=n.name||(null!=e?e.name:e))?i:l,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"'>"+r((i=null!=(i=n["default"]||(null!=e?e["default"]:e))?i:l,typeof i===s?i.call(e,{name:"default",hash:{},data:a}):i))+'</textarea>\n <br />\n <div class="parameter-content-type" />\n'},7:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;
|
|
return" <textarea class='body-textarea required' placeholder='(required)' name='"+r((i=null!=(i=n.name||(null!=e?e.name:e))?i:l,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+'\'></textarea>\n <br />\n <div class="parameter-content-type" />\n'},9:function(e,n,t,a){var i,s="";return i=n["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(10,a),inverse:this.program(12,a),data:a}),null!=i&&(s+=i),s},10:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" <input class='parameter' class='required' type='file' name='"+r((i=null!=(i=n.name||(null!=e?e.name:e))?i:l,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"'/>\n"},12:function(e,n,t,a){var i,s="";return i=n["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(13,a),inverse:this.program(15,a),data:a}),null!=i&&(s+=i),s},13:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" <input class='parameter required' minlength='1' name='"+r((i=null!=(i=n.name||(null!=e?e.name:e))?i:l,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"' placeholder='(required)' type='text' value='"+r((i=null!=(i=n["default"]||(null!=e?e["default"]:e))?i:l,typeof i===s?i.call(e,{name:"default",hash:{},data:a}):i))+"'/>\n"},15:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" <input class='parameter required' minlength='1' name='"+r((i=null!=(i=n.name||(null!=e?e.name:e))?i:l,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"' placeholder='(required)' type='text' value=''/>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s,l="function",r=n.helperMissing,o=this.escapeExpression,u="<td class='code required'>"+o((s=null!=(s=n.name||(null!=e?e.name:e))?s:r,typeof s===l?s.call(e,{name:"name",hash:{},data:a}):s))+"</td>\n<td>\n";return i=n["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(9,a),data:a}),null!=i&&(u+=i),u+='</td>\n<td>\n <strong><span class="markdown">',s=null!=(s=n.description||(null!=e?e.description:e))?s:r,i=typeof s===l?s.call(e,{name:"description",hash:{},data:a}):s,null!=i&&(u+=i),u+="</span></strong>\n</td>\n<td>",s=null!=(s=n.paramType||(null!=e?e.paramType:e))?s:r,i=typeof s===l?s.call(e,{name:"paramType",hash:{},data:a}):s,null!=i&&(u+=i),u+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.parameter_content_type=Handlebars.template({1:function(e,n,t,a){var i,s="";return i=n.each.call(e,null!=e?e.consumes:e,{name:"each",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=i&&(s+=i),s},2:function(e){var n,t=this.lambda,a=' <option value="';return n=t(e,e),null!=n&&(a+=n),a+='">',n=t(e,e),null!=n&&(a+=n),a+"</option>\n"},4:function(){return' <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s='<label for="parameterContentType"></label>\n<select name="parameterContentType">\n';return i=n["if"].call(e,null!=e?e.consumes:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(4,a),data:a}),null!=i&&(s+=i),s+"</select>\n"},useData:!0}),this.Handlebars.templates.resource=Handlebars.template({1:function(){return" : "},3:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return" <li>\n <a href='"+r((i=null!=(i=n.url||(null!=e?e.url:e))?i:l,typeof i===s?i.call(e,{name:"url",hash:{},data:a}):i))+"'>Raw</a>\n </li>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s,l,r="function",o=n.helperMissing,u=this.escapeExpression,d=n.blockHelperMissing,p="<div class='heading'>\n <h2>\n <a href='#!/"+u((s=null!=(s=n.id||(null!=e?e.id:e))?s:o,typeof s===r?s.call(e,{name:"id",hash:{},data:a}):s))+'\' class="toggleEndpointList" data-id="'+u((s=null!=(s=n.id||(null!=e?e.id:e))?s:o,typeof s===r?s.call(e,{name:"id",hash:{},data:a}):s))+'">'+u((s=null!=(s=n.name||(null!=e?e.name:e))?s:o,typeof s===r?s.call(e,{name:"name",hash:{},data:a}):s))+"</a> ";return s=null!=(s=n.summary||(null!=e?e.summary:e))?s:o,l={name:"summary",hash:{},fn:this.program(1,a),inverse:this.noop,data:a},i=typeof s===r?s.call(e,l):s,n.summary||(i=d.call(e,i,l)),null!=i&&(p+=i),s=null!=(s=n.summary||(null!=e?e.summary:e))?s:o,i=typeof s===r?s.call(e,{name:"summary",hash:{},data:a}):s,null!=i&&(p+=i),p+="\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/"+u((s=null!=(s=n.id||(null!=e?e.id:e))?s:o,typeof s===r?s.call(e,{name:"id",hash:{},data:a}):s))+"' id='endpointListTogger_"+u((s=null!=(s=n.id||(null!=e?e.id:e))?s:o,typeof s===r?s.call(e,{name:"id",hash:{},data:a}):s))+'\' class="toggleEndpointList" data-id="'+u((s=null!=(s=n.id||(null!=e?e.id:e))?s:o,typeof s===r?s.call(e,{name:"id",hash:{},data:a}):s))+'">Show/Hide</a>\n </li>\n <li>\n <a href=\'#\' class="collapseResource" data-id="'+u((s=null!=(s=n.id||(null!=e?e.id:e))?s:o,typeof s===r?s.call(e,{name:"id",hash:{},data:a}):s))+'">\n List Operations\n </a>\n </li>\n <li>\n <a href=\'#\' class="expandResource" data-id="'+u((s=null!=(s=n.id||(null!=e?e.id:e))?s:o,typeof s===r?s.call(e,{name:"id",hash:{},data:a}):s))+'">\n Expand Operations\n </a>\n </li>\n',i=n["if"].call(e,null!=e?e.url:e,{name:"if",hash:{},fn:this.program(3,a),inverse:this.noop,data:a}),null!=i&&(p+=i),p+" </ul>\n</div>\n<ul class='endpoints' id='"+u((s=null!=(s=n.id||(null!=e?e.id:e))?s:o,typeof s===r?s.call(e,{name:"id",hash:{},data:a}):s))+"_endpoint_list' style='display:none'>\n\n</ul>\n"},useData:!0}),this.Handlebars.templates.response_content_type=Handlebars.template({1:function(e,n,t,a){var i,s="";return i=n.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=i&&(s+=i),s},2:function(e){var n,t=this.lambda,a=' <option value="';return n=t(e,e),null!=n&&(a+=n),a+='">',n=t(e,e),null!=n&&(a+=n),a+"</option>\n"},4:function(){return' <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s='<label for="responseContentType"></label>\n<select name="responseContentType">\n';return i=n["if"].call(e,null!=e?e.produces:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(4,a),data:a}),null!=i&&(s+=i),s+"</select>\n"},useData:!0}),this.Handlebars.templates.signature=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s,l="function",r=n.helperMissing,o=this.escapeExpression,u='<div>\n<ul class="signature-nav">\n <li><a class="description-link" href="#">Model</a></li>\n <li><a class="snippet-link" href="#">Model Schema</a></li>\n</ul>\n<div>\n\n<div class="signature-container">\n <div class="description">\n ';return s=null!=(s=n.signature||(null!=e?e.signature:e))?s:r,i=typeof s===l?s.call(e,{name:"signature",hash:{},data:a}):s,null!=i&&(u+=i),u+'\n </div>\n\n <div class="snippet">\n <pre><code>'+o((s=null!=(s=n.sampleJSON||(null!=e?e.sampleJSON:e))?s:r,typeof s===l?s.call(e,{name:"sampleJSON",hash:{},data:a}):s))+'</code></pre>\n <small class="notice"></small>\n </div>\n</div>\n\n'},useData:!0}),this.Handlebars.templates.status_code=Handlebars.template({1:function(e,n,t,a){var i=this.lambda,s=this.escapeExpression;return" <tr>\n <td>"+s(i(a&&a.key,e))+"</td>\n <td>"+s(i(null!=e?e.description:e,e))+"</td>\n <td>"+s(i(null!=e?e.type:e,e))+"</td>\n </tr>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s,l="function",r=n.helperMissing,o=this.escapeExpression,u="<td width='15%' class='code'>"+o((s=null!=(s=n.code||(null!=e?e.code:e))?s:r,typeof s===l?s.call(e,{name:"code",hash:{},data:a}):s))+"</td>\n<td>";return s=null!=(s=n.message||(null!=e?e.message:e))?s:r,i=typeof s===l?s.call(e,{name:"message",hash:{},data:a}):s,null!=i&&(u+=i),u+='</td>\n<td width=\'50%\'><span class="model-signature" /></td>\n<td class="headers">\n <table>\n <tbody>\n',i=n.each.call(e,null!=e?e.headers:e,{name:"each",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+" </tbody>\n </table>\n</td>"},useData:!0}),SwaggerUi.Views.ApiKeyButton=Backbone.View.extend({events:{"click #apikey_button":"toggleApiKeyContainer","click #apply_api_key":"applyApiKey"},initialize:function(e){this.options=e||{},this.router=this.options.router},render:function(){var e=this.template();return $(this.el).html(e(this.model)),this},applyApiKey:function(){var e=new SwaggerClient.ApiKeyAuthorization(this.model.name,$("#input_apiKey_entry").val(),this.model["in"]);this.router.api.clientAuthorizations.add(this.model.name,e),this.router.load(),$("#apikey_container").show()},toggleApiKeyContainer:function(){if($("#apikey_container").length){var e=$("#apikey_container").first();e.is(":visible")?e.hide():($(".auth_container").hide(),e.show())}},template:function(){return Handlebars.templates.apikey_button_view}}),SwaggerUi.Views.BasicAuthButton=Backbone.View.extend({initialize:function(e){this.options=e||{},this.router=this.options.router},render:function(){var e=this.template();return $(this.el).html(e(this.model)),this},events:{"click #basic_auth_button":"togglePasswordContainer","click #apply_basic_auth":"applyPassword"},applyPassword:function(){var e=$(".input_username").val(),n=$(".input_password").val(),t=new SwaggerClient.PasswordAuthorization("basic",e,n);this.router.api.clientAuthorizations.add(this.model.type,t),this.router.load(),$("#basic_auth_container").hide()},togglePasswordContainer:function(){if($("#basic_auth_container").length){var e=$("#basic_auth_container").show();e.is(":visible")?e.slideUp():($(".auth_container").hide(),e.show())}},template:function(){return Handlebars.templates.basic_auth_button_view}}),SwaggerUi.Views.ContentTypeView=Backbone.View.extend({initialize:function(){},render:function(){return $(this.el).html(Handlebars.templates.content_type(this.model)),$("label[for=contentType]",$(this.el)).text("Response Content Type"),this}}),SwaggerUi.Views.HeaderView=Backbone.View.extend({events:{"click #show-pet-store-icon":"showPetStore","click #show-wordnik-dev-icon":"showWordnikDev","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"},initialize:function(){},showPetStore:function(){this.trigger("update-swagger-ui",{url:"http://petstore.swagger.wordnik.com/api/api-docs"})},showWordnikDev:function(){this.trigger("update-swagger-ui",{url:"http://api.wordnik.com/v4/resources.json"})},showCustomOnKeyup:function(e){13===e.keyCode&&this.showCustom()},showCustom:function(e){e&&e.preventDefault(),this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val(),apiKey:$("#input_apiKey").val()})},update:function(e,n,t){void 0===t&&(t=!1),$("#input_baseUrl").val(e),t&&this.trigger("update-swagger-ui",{url:e})}}),SwaggerUi.Views.MainView=Backbone.View.extend({initialize:function(e){e=e||{},this.router=e.router,this.model.auths=[];var n,t;for(n in this.model.securityDefinitions)t=this.model.securityDefinitions[n],this.model.auths.push({name:n,type:t.type,value:t});"2.0"===this.model.swaggerVersion&&(this.model.validatorUrl="validatorUrl"in e.swaggerOptions?e.swaggerOptions.validatorUrl:this.model.url.indexOf("localhost")>0?null:"http://online.swagger.io/validator");var a;for(a in this.model.definitions)this.model.definitions[a].type="object"},render:function(){if(this.model.securityDefinitions)for(var e in this.model.securityDefinitions){var n,t=this.model.securityDefinitions[e];"apiKey"===t.type&&0===$("#apikey_button").length&&(n=new SwaggerUi.Views.ApiKeyButton({model:t,router:this.router}).render().el,$(".auth_main_container").append(n)),"basicAuth"===t.type&&0===$("#basic_auth_button").length&&(n=new SwaggerUi.Views.BasicAuthButton({model:t,router:this.router}).render().el,$(".auth_main_container").append(n))}$(this.el).html(Handlebars.templates.main(this.model));for(var a={},i=0,s=0;s<this.model.apisArray.length;s++){for(var l=this.model.apisArray[s],r=l.name;"undefined"!=typeof a[r];)r=r+"_"+i,i+=1;l.id=r,a[r]=l,this.addResource(l,this.model.auths)}return $(".propWrap").hover(function(){$(".optionsWrapper",$(this)).show()},function(){$(".optionsWrapper",$(this)).hide()}),this},addResource:function(e,n){e.id=e.id.replace(/\s/g,"_"),e.definitions=this.model.definitions;var t=new SwaggerUi.Views.ResourceView({model:e,router:this.router,tagName:"li",id:"resource_"+e.id,className:"resource",auths:n,swaggerOptions:this.options.swaggerOptions});$("#resources").append(t.render().el)},clear:function(){$(this.el).html("")}}),SwaggerUi.Views.OperationView=Backbone.View.extend({invocationUrl:null,events:{"submit .sandbox":"submitOperation","click .submit":"submitOperation","click .response_hider":"hideResponse","click .toggleOperation":"toggleOperationContent","mouseenter .api-ic":"mouseEnter","mouseout .api-ic":"mouseExit"},initialize:function(e){return e=e||{},this.router=e.router,this.auths=e.auths,this.parentId=this.model.parentId,this.nickname=this.model.nickname,this.model.encodedParentId=encodeURIComponent(this.parentId),this},mouseEnter:function(e){var n=$(this.el).find(".content"),t=e.pageX,a=e.pageY,i=$(window).scrollLeft(),s=$(window).scrollTop(),l=i+$(window).width(),r=s+$(window).height(),o=n.width(),u=n.height();t+o>l&&(t=l-o),i>t&&(t=i),a+u>r&&(a=r-u),s>a&&(a=s);var d={};d.top=a,d.left=t,n.css(d),$(e.currentTarget.parentNode).find("#api_information_panel").show()},mouseExit:function(e){$(e.currentTarget.parentNode).find("#api_information_panel").hide()},render:function(){var e,n,t,a,i,s,l,r,o,u,d,p,h,c,m,f,g,v,y,w,b,_,x,S,k,O,C,E,V,T,D,U,M,H,R,P,A,N;if(s=jQuery.inArray(this.model.method,this.model.supportedSubmitMethods())>=0,s||(this.model.isReadOnly=!0),this.model.description=this.model.description||this.model.notes,this.model.oauth=null,f=this.model.authorizations||this.model.security)if(Array.isArray(f))for(o=0,u=f.length;u>o;o++){t=f[o];for(r in t){n=t[r];for(e in this.auths)if(n=this.auths[e],"oauth2"===n.type){this.model.oauth={},this.model.oauth.scopes=[],x=n.value.scopes;for(l in x)A=x[l],U=t[r].indexOf(l),U>=0&&(v={scope:l,description:A},this.model.oauth.scopes.push(v))}}}else for(l in f)if(A=f[l],"oauth2"===l)for(null===this.model.oauth&&(this.model.oauth={}),void 0===this.model.oauth.scopes&&(this.model.oauth.scopes=[]),m=0,d=A.length;d>m;m++)v=A[m],this.model.oauth.scopes.push(v);if("undefined"!=typeof this.model.responses){this.model.responseMessages=[],S=this.model.responses;for(a in S)N=S[a],T=null,D=this.model.responses[a].schema,D&&D.$ref&&(T=D.$ref,0===T.indexOf("#/definitions/")&&(T=T.substring("#/definitions/".length))),this.model.responseMessages.push({code:a,message:N.description,responseModel:T})}if("undefined"==typeof this.model.responseMessages&&(this.model.responseMessages=[]),M=null,this.model.successResponse){R=this.model.successResponse;for(r in R)N=R[r],this.model.successCode=r,"object"==typeof N&&"function"==typeof N.createJSONSample&&(M={sampleJSON:JSON.stringify(N.createJSONSample(),void 0,2),isParam:!1,signature:N.getMockSignature()})}else this.model.responseClassSignature&&"string"!==this.model.responseClassSignature&&(M={sampleJSON:this.model.responseSampleJSON,isParam:!1,signature:this.model.responseClassSignature});for($(this.el).html(Handlebars.templates.operation(this.model)),M?(V=new SwaggerUi.Views.SignatureView({model:M,router:this.router,tagName:"div"}),$(".model-signature",$(this.el)).append(V.render().el)):(this.model.responseClassSignature="string",$(".model-signature",$(this.el)).html(this.model.type)),i={isParam:!1},i.consumes=this.model.consumes,i.produces=this.model.produces,k=this.model.parameters,g=0,p=k.length;p>g;g++)w=k[g],P=w.type||w.dataType||"","undefined"==typeof P&&(T=w.schema,T&&T.$ref&&(_=T.$ref,P=0===_.indexOf("#/definitions/")?_.substring("#/definitions/".length):_)),P&&"file"===P.toLowerCase()&&(i.consumes||(i.consumes="multipart/form-data")),w.type=P;for(E=new SwaggerUi.Views.ResponseContentTypeView({model:i,router:this.router}),$(".response-content-type",$(this.el)).append(E.render().el),O=this.model.parameters,y=0,h=O.length;h>y;y++)w=O[y],this.addParameter(w,i.consumes);for(C=this.model.responseMessages,b=0,c=C.length;c>b;b++)H=C[b],this.addStatusCode(H);return this},addParameter:function(e,n){e.consumes=n,e.schema&&($.extend(!0,e.schema,this.model.definitions[e.type]),e.schema.definitions=this.model.definitions,e.schema.type="object",e.schema.title=" ");var t=new SwaggerUi.Views.ParameterView({model:e,tagName:"tr",readOnly:this.model.isReadOnly,swaggerOptions:this.options.swaggerOptions});$(".operation-params",$(this.el)).append(t.render().el)},addStatusCode:function(e){var n=new SwaggerUi.Views.StatusCodeView({model:e,tagName:"tr",router:this.router});$(".operation-status",$(this.el)).append(n.render().el)},submitOperation:function(e){var n,t,a,i,s,l,r,o,u,d,p,h,c,m,f,g;if(null!==e&&e.preventDefault(),t=$(".sandbox",$(this.el)),n=!0,t.find("input.required").each(function(){$(this).removeClass("error"),""===jQuery.trim($(this).val())&&($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){$(e).focus()}}(this)}),n=!1)}),t.find("textarea.required").each(function(){$(this).removeClass("error"),""===jQuery.trim($(this).val())&&($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){return $(e).focus()}}(this)}),n=!1)}),n){for(u={},h={parent:this},a=!1,c=t.find("input"),i=0,s=c.length;s>i;i++)p=c[i],null!==p.value&&jQuery.trim(p.value).length>0&&(u[p.name]=p.value),"file"===p.type&&(u[p.name]=p.files[0],a=!0);for(m=t.find("textarea"),o=0,l=m.length;l>o;o++)p=m[o],null!==p.value&&jQuery.trim(p.value).length>0&&(u[p.name]=p.value);for(f=t.find("select"),d=0,r=f.length;r>d;d++)p=f[d],g=this.getSelectedValue(p),null!==g&&jQuery.trim(g).length>0&&(u[p.name]=g);var v;for(v=0;v<this.model.parameters.length;v++){var y=this.model.parameters[v];if(y.jsonEditor&&y.jsonEditor.isEnabled()){var w=y.jsonEditor.getValue();u[y.name]=JSON.stringify(w)}}return h.responseContentType=$("div select[name=responseContentType]",$(this.el)).val(),h.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val(),$(".response_throbber",$(this.el)).show(),a?this.handleFileUpload(u,t):this.model["do"](u,h,this.showCompleteStatus,this.showErrorStatus,this)}},success:function(e,n){n.showCompleteStatus(e)},handleFileUpload:function(e,n){var t,a,i,s,l,r,o,u,d,p,h,c,m,f,g,v,y,w,b;for(v=n.serializeArray(),s=0,l=v.length;l>s;s++)h=v[s],null!==h.value&&jQuery.trim(h.value).length>0&&(e[h.name]=h.value);for(t=new FormData,g=0,y=this.model.parameters,d=0,r=y.length;r>d;d++)f=y[d],("form"===f.paramType||"formData"===f["in"])&&"file"!==f.type.toLowerCase()&&void 0!==e[f.name]&&t.append(f.name,e[f.name]);for(i={},w=this.model.parameters,p=0,o=w.length;o>p;p++)f=w[p],"header"===f.paramType&&(i[f.name]=e[f.name]);for(b=n.find('input[type~="file"]'),m=0,u=b.length;u>m;m++)a=b[m],"undefined"!=typeof a.files[0]&&(t.append($(a).attr("name"),a.files[0]),g+=1);return this.invocationUrl=this.model.supportHeaderParams()?(i=this.model.getHeaderParams(e),delete i["Content-Type"],this.model.urlify(e,!1)):this.model.urlify(e,!0),$(".request_url",$(this.el)).html("<pre></pre>"),$(".request_url pre",$(this.el)).text(this.invocationUrl),c={type:this.model.method,url:this.invocationUrl,headers:i,data:t,dataType:"json",contentType:!1,processData:!1,error:function(e){return function(n){return e.showErrorStatus(e.wrap(n),e)}}(this),success:function(e){return function(n){return e.showResponse(n,e)}}(this),complete:function(e){return function(n){return e.showCompleteStatus(e.wrap(n),e)}}(this)},window.authorizations&&window.authorizations.apply(c),jQuery.ajax(c),!1},wrap:function(e){var n,t,a,i,s,l,r;for(a={},t=e.getAllResponseHeaders().split("\r"),s=0,l=t.length;l>s;s++)i=t[s],n=i.match(/^([^:]*?):(.*)$/),n||(n=[]),n.shift(),void 0!==n[0]&&void 0!==n[1]&&(a[n[0].trim()]=n[1].trim());return r={},r.content={},r.content.data=e.responseText,r.headers=a,r.request={},r.request.url=this.invocationUrl,r.status=e.status,r},getSelectedValue:function(e){if(e.multiple){for(var n=[],t=0,a=e.options.length;a>t;t++){var i=e.options[t];i.selected&&n.push(i.value)}return n.length>0?n:null}return e.value},hideResponse:function(e){e&&e.preventDefault(),$(".response",$(this.el)).slideUp(),$(".response_hider",$(this.el)).fadeOut()},showResponse:function(e){var n=JSON.stringify(e,null," ").replace(/\n/g,"<br>");$(".response_body",$(this.el)).html(_.escape(n))},showErrorStatus:function(e,n){n.showStatus(e)},showCompleteStatus:function(e,n){n.showStatus(e)},formatXml:function(e){var n,t,a,i,s,l,r,o,u,d,p,h,c;for(p=/(>)(<)(\/*)/g,c=/[ ]*(.*)[ ]+\n/g,n=/(<.+>)(.+\n)/g,e=e.replace(p,"$1\n$2$3").replace(c,"$1\n").replace(n,"$1\n$2"),d=0,a="",o=e.split("\n"),i=0,l="other",h={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},t=function(e){var n,t,s,r,o,u,d;u={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},o=function(){var e;e=[];for(s in u)d=u[s],d&&e.push(s);return e}()[0],o=void 0===o?"other":o,n=l+"->"+o,l=o,r="",i+=h[n],r=function(){var e,n,a;for(a=[],t=e=0,n=i;n>=0?n>e:e>n;t=n>=0?++e:--e)a.push(" ");return a}().join(""),"opening->closing"===n?a=a.substr(0,a.length-1)+e+"\n":a+=r+e+"\n"},s=0,r=o.length;r>s;s++)u=o[s],t(u);return a},showStatus:function(e){var n,t;void 0===e.content?(t=e.data,n=e.url):(t=e.content.data,n=e.request.url);var a=e.headers,i=null;a&&(i=a["Content-Type"]||a["content-type"],i&&(i=i.split(";")[0].trim())),$(".response_body",$(this.el)).removeClass("json"),$(".response_body",$(this.el)).removeClass("xml");var s,l,r=function(e){var n=document.createElement("audio");return!(!n.canPlayType||!n.canPlayType(e).replace(/no/,""))};if(t)if("application/json"===i||/\+json$/.test(i)){var o=null;try{o=JSON.stringify(JSON.parse(t),null," ")}catch(u){o="can't parse JSON. Raw result:\n\n"+t}l=$("<code />").text(o),s=$('<pre class="json" />').append(l)}else"application/xml"===i||/\+xml$/.test(i)?(l=$("<code />").text(this.formatXml(t)),s=$('<pre class="xml" />').append(l)):"text/html"===i?(l=$("<code />").html(_.escape(t)),s=$('<pre class="xml" />').append(l)):/^image\//.test(i)?s=$("<img>").attr("src",n):/^audio\//.test(i)&&r(i)?s=$("<audio controls>").append($("<source>").attr("src",n).attr("type",i)):(l=$("<code />").text(t),s=$('<pre class="json" />').append(l));else l=$("<code />").text("no content"),s=$('<pre class="json" />').append(l);var d=s;$(".request_url",$(this.el)).html("<pre></pre>"),$(".request_url pre",$(this.el)).text(n),$(".response_code",$(this.el)).html("<pre>"+e.status+"</pre>"),$(".response_body",$(this.el)).html(d),$(".response_headers",$(this.el)).html("<pre>"+_.escape(JSON.stringify(e.headers,null," ")).replace(/\n/g,"<br>")+"</pre>"),$(".response",$(this.el)).slideDown(),$(".response_hider",$(this.el)).show(),$(".response_throbber",$(this.el)).hide();var p=$(".response_body",$(this.el))[0],h=this.options.swaggerOptions;return h.highlightSizeThreshold&&e.data.length>h.highlightSizeThreshold?p:hljs.highlightBlock(p)},toggleOperationContent:function(){var e=$("#"+Docs.escapeResourceName(this.parentId+"_"+this.nickname+"_content"));e.is(":visible")?Docs.collapseOperation(e):Docs.expandOperation(e)}}),SwaggerUi.Views.ParameterContentTypeView=Backbone.View.extend({initialize:function(){},render:function(){return $(this.el).html(Handlebars.templates.parameter_content_type(this.model)),$("label[for=parameterContentType]",$(this.el)).text("Parameter content type:"),this}}),SwaggerUi.Views.ParameterView=Backbone.View.extend({initialize:function(){Handlebars.registerHelper("isArray",function(e,n){"array"===e.type.toLowerCase()||e.allowMultiple?n.fn(this):n.inverse(this)})},render:function(){var e=this.model.type||this.model.dataType;if("undefined"==typeof e){var n=this.model.schema;if(n&&n.$ref){var t=n.$ref;e=0===t.indexOf("#/definitions/")?t.substring("#/definitions/".length):t}}this.model.type=e,this.model.paramType=this.model["in"]||this.model.paramType,this.model.isBody="body"===this.model.paramType||"body"===this.model["in"],this.model.isFile=e&&"file"===e.toLowerCase(),this.model["default"]=this.model["default"]||this.model.defaultValue,this.model.allowableValues&&(this.model.isList=!0);var a=this.template();$(this.el).html(a(this.model));var i={sampleJSON:this.model.sampleJSON,isParam:!0,signature:this.model.signature};if(this.model.sampleJSON){var s=new SwaggerUi.Views.SignatureView({model:i,tagName:"div"});$(".model-signature",$(this.el)).append(s.render().el)}else $(".model-signature",$(this.el)).html(this.model.signature);var l=!1;if(this.options.swaggerOptions.jsonEditor&&this.model.isBody&&this.model.schema){var r=$(this.el);this.model.jsonEditor=new JSONEditor($(".editor_holder",r)[0],{schema:this.model.schema,startval:this.model["default"],ajax:!0}),i.jsonEditor=this.model.jsonEditor,$(".body-textarea",r).hide(),$(".editor_holder",r).show(),$(".parameter-content-type",r).change(function(e){"application/xml"==e.target.value?($(".body-textarea",r).show(),$(".editor_holder",r).hide(),this.model.jsonEditor.disable()):($(".body-textarea",r).hide(),$(".editor_holder",r).show(),this.model.jsonEditor.enable())})}this.model.isBody&&(l=!0);var o={isParam:l};if(o.consumes=this.model.consumes,l){var u=new SwaggerUi.Views.ParameterContentTypeView({model:o});$(".parameter-content-type",$(this.el)).append(u.render().el)}else{var d=new SwaggerUi.Views.ResponseContentTypeView({model:o});$(".response-content-type",$(this.el)).append(d.render().el)}return this},template:function(){return this.model.isList?Handlebars.templates.param_list:this.options.readOnly?this.model.required?Handlebars.templates.param_readonly_required:Handlebars.templates.param_readonly:this.model.required?Handlebars.templates.param_required:Handlebars.templates.param}}),SwaggerUi.Views.ResourceView=Backbone.View.extend({initialize:function(e){e=e||{},this.router=e.router,this.auths=e.auths,""===this.model.description&&(this.model.description=null),this.model.description&&(this.model.summary=this.model.description)},render:function(){var e={};$(this.el).html(Handlebars.templates.resource(this.model));for(var n=0;n<this.model.operationsArray.length;n++){for(var t=this.model.operationsArray[n],a=0,i=t.nickname;"undefined"!=typeof e[i];)i=i+"_"+a,a+=1;e[i]=t,t.nickname=i,t.parentId=this.model.id,t.definitions=this.model.definitions,this.addOperation(t)}return $(".toggleEndpointList",this.el).click(this.callDocs.bind(this,"toggleEndpointListForResource")),$(".collapseResource",this.el).click(this.callDocs.bind(this,"collapseOperationsForResource")),$(".expandResource",this.el).click(this.callDocs.bind(this,"expandOperationsForResource")),this},addOperation:function(e){e.number=this.number;var n=new SwaggerUi.Views.OperationView({model:e,router:this.router,tagName:"li",className:"endpoint",swaggerOptions:this.options.swaggerOptions,auths:this.auths});$(".endpoints",$(this.el)).append(n.render().el),this.number++},callDocs:function(e,n){n.preventDefault(),Docs[e](n.currentTarget.getAttribute("data-id"))}}),SwaggerUi.Views.ResponseContentTypeView=Backbone.View.extend({initialize:function(){},render:function(){return $(this.el).html(Handlebars.templates.response_content_type(this.model)),$("label[for=responseContentType]",$(this.el)).text("Response Content Type"),this}}),SwaggerUi.Views.SignatureView=Backbone.View.extend({events:{"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet":"snippetToTextArea"},initialize:function(){},render:function(){return $(this.el).html(Handlebars.templates.signature(this.model)),this.switchToSnippet(),this.isParam=this.model.isParam,this.isParam&&$(".notice",$(this.el)).text("Click to set as parameter value"),this},switchToDescription:function(e){e&&e.preventDefault(),$(".snippet",$(this.el)).hide(),$(".description",$(this.el)).show(),$(".description-link",$(this.el)).addClass("selected"),$(".snippet-link",$(this.el)).removeClass("selected")},switchToSnippet:function(e){e&&e.preventDefault(),$(".description",$(this.el)).hide(),$(".snippet",$(this.el)).show(),$(".snippet-link",$(this.el)).addClass("selected"),$(".description-link",$(this.el)).removeClass("selected")},snippetToTextArea:function(e){if(this.isParam){e&&e.preventDefault();var n=$("textarea",$(this.el.parentNode.parentNode.parentNode));""===$.trim(n.val())&&(n.val(this.model.sampleJSON),this.model.jsonEditor&&this.model.jsonEditor.isEnabled()&&this.model.jsonEditor.setValue(JSON.parse(this.model.sampleJSON)))}}}),SwaggerUi.Views.StatusCodeView=Backbone.View.extend({initialize:function(e){this.options=e||{},this.router=this.options.router},render:function(){if($(this.el).html(Handlebars.templates.status_code(this.model)),this.router.api.models.hasOwnProperty(this.model.responseModel)){var e={sampleJSON:JSON.stringify(this.router.api.models[this.model.responseModel].createJSONSample(),null,2),isParam:!1,signature:this.router.api.models[this.model.responseModel].getMockSignature()},n=new SwaggerUi.Views.SignatureView({model:e,tagName:"div"});$(".model-signature",this.$el).append(n.render().el)}else $(".model-signature",this.$el).html("");return this}})}).call(this); |