swagger_yard 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +113 -0
  4. data/Rakefile +40 -0
  5. data/app/controllers/swagger_yard/application_controller.rb +4 -0
  6. data/app/controllers/swagger_yard/swagger_controller.rb +21 -0
  7. data/app/views/swagger_yard/swagger/doc.html.erb +80 -0
  8. data/config/routes.rb +6 -0
  9. data/lib/generators/swagger_yard/doc_generator.rb +11 -0
  10. data/lib/generators/swagger_yard/js_generator.rb +13 -0
  11. data/lib/swagger_yard.rb +113 -0
  12. data/lib/swagger_yard/api.rb +132 -0
  13. data/lib/swagger_yard/api_declaration.rb +42 -0
  14. data/lib/swagger_yard/cache.rb +50 -0
  15. data/lib/swagger_yard/engine.rb +18 -0
  16. data/lib/swagger_yard/local_dispatcher.rb +51 -0
  17. data/lib/swagger_yard/parameter.rb +9 -0
  18. data/lib/swagger_yard/parser.rb +35 -0
  19. data/lib/swagger_yard/resource_listing.rb +32 -0
  20. data/lib/swagger_yard/version.rb +3 -0
  21. data/public/swagger-ui/css/hightlight.default.css +135 -0
  22. data/public/swagger-ui/css/screen.css +1759 -0
  23. data/public/swagger-ui/images/logo_small.png +0 -0
  24. data/public/swagger-ui/images/pet_store_api.png +0 -0
  25. data/public/swagger-ui/images/throbber.gif +0 -0
  26. data/public/swagger-ui/images/wordnik_api.png +0 -0
  27. data/public/swagger-ui/lib/MD5.js +319 -0
  28. data/public/swagger-ui/lib/backbone-min.js +38 -0
  29. data/public/swagger-ui/lib/handlebars-1.0.rc.1.js +1920 -0
  30. data/public/swagger-ui/lib/highlight.7.3.pack.js +1 -0
  31. data/public/swagger-ui/lib/jquery-1.8.0.min.js +2 -0
  32. data/public/swagger-ui/lib/jquery.ba-bbq.min.js +18 -0
  33. data/public/swagger-ui/lib/jquery.slideto.min.js +1 -0
  34. data/public/swagger-ui/lib/jquery.wiggle.min.js +8 -0
  35. data/public/swagger-ui/lib/swagger.js +794 -0
  36. data/public/swagger-ui/lib/underscore-min.js +32 -0
  37. data/public/swagger-ui/swagger-ui.js +2090 -0
  38. data/public/swagger-ui/swagger-ui_org.js +2005 -0
  39. metadata +125 -0
@@ -0,0 +1,32 @@
1
+ // Underscore.js 1.3.3
2
+ // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
3
+ // Underscore is freely distributable under the MIT license.
4
+ // Portions of Underscore are inspired or borrowed from Prototype,
5
+ // Oliver Steele's Functional, and John Resig's Micro-Templating.
6
+ // For all details and documentation:
7
+ // http://documentcloud.github.com/underscore
8
+ (function(){function r(a,c,d){if(a===c)return 0!==a||1/a==1/c;if(null==a||null==c)return a===c;a._chain&&(a=a._wrapped);c._chain&&(c=c._wrapped);if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return!1;switch(e){case "[object String]":return a==""+c;case "[object Number]":return a!=+a?c!=+c:0==a?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
9
+ c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if("object"!=typeof a||"object"!=typeof c)return!1;for(var f=d.length;f--;)if(d[f]==a)return!0;d.push(a);var f=0,g=!0;if("[object Array]"==e){if(f=a.length,g=f==c.length)for(;f--&&(g=f in a==f in c&&r(a[f],c[f],d)););}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return!1;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&r(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,h)&&!f--)break;
10
+ g=!f}}d.pop();return g}var s=this,I=s._,o={},k=Array.prototype,p=Object.prototype,i=k.slice,J=k.unshift,l=p.toString,K=p.hasOwnProperty,y=k.forEach,z=k.map,A=k.reduce,B=k.reduceRight,C=k.filter,D=k.every,E=k.some,q=k.indexOf,F=k.lastIndexOf,p=Array.isArray,L=Object.keys,t=Function.prototype.bind,b=function(a){return new m(a)};"undefined"!==typeof exports?("undefined"!==typeof module&&module.exports&&(exports=module.exports=b),exports._=b):s._=b;b.VERSION="1.3.3";var j=b.each=b.forEach=function(a,
11
+ c,d){if(a!=null)if(y&&a.forEach===y)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e<f;e++){if(e in a&&c.call(d,a[e],e,a)===o)break}else for(e in a)if(b.has(a,e)&&c.call(d,a[e],e,a)===o)break};b.map=b.collect=function(a,c,b){var e=[];if(a==null)return e;if(z&&a.map===z)return a.map(c,b);j(a,function(a,g,h){e[e.length]=c.call(b,a,g,h)});if(a.length===+a.length)e.length=a.length;return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(A&&
12
+ a.reduce===A){e&&(c=b.bind(c,e));return f?a.reduce(c,d):a.reduce(c)}j(a,function(a,b,i){if(f)d=c.call(e,d,a,b,i);else{d=a;f=true}});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(B&&a.reduceRight===B){e&&(c=b.bind(c,e));return f?a.reduceRight(c,d):a.reduceRight(c)}var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=function(a,
13
+ c,b){var e;G(a,function(a,g,h){if(c.call(b,a,g,h)){e=a;return true}});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(C&&a.filter===C)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(D&&a.every===D)return a.every(c,b);j(a,function(a,g,h){if(!(e=e&&c.call(b,
14
+ a,g,h)))return o});return!!e};var G=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(E&&a.some===E)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return o});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;if(q&&a.indexOf===q)return a.indexOf(c)!=-1;return b=G(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
15
+ function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a)&&a[0]===+a[0])return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a)&&a[0]===+a[0])return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&
16
+ (e={value:a,computed:b})});return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){d=Math.floor(Math.random()*(f+1));b[f]=b[d];b[d]=a});return b};b.sortBy=function(a,c,d){var e=b.isFunction(c)?c:function(a){return a[c]};return b.pluck(b.map(a,function(a,b,c){return{value:a,criteria:e.call(d,a,b,c)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c===void 0?1:d===void 0?-1:c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};
17
+ j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=function(a){return!a?[]:b.isArray(a)||b.isArguments(a)?i.call(a):a.toArray&&b.isFunction(a.toArray)?a.toArray():b.values(a)};b.size=function(a){return b.isArray(a)?a.length:b.keys(a).length};b.first=b.head=b.take=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,
18
+ 0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,Math.max(a.length-b,0)):a[a.length-1]};b.rest=b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,
19
+ e=[];a.length<3&&(c=true);b.reduce(d,function(d,g,h){if(c?b.last(d)!==g||!d.length:!b.include(d,g)){d.push(g);e.push(a[h])}return d},[]);return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1),true);return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=
20
+ i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,d){if(a==null)return-1;var e;if(d){d=b.sortedIndex(a,c);return a[d]===c?d:-1}if(q&&a.indexOf===q)return a.indexOf(c);d=0;for(e=a.length;d<e;d++)if(d in a&&a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(F&&a.lastIndexOf===F)return a.lastIndexOf(b);for(var d=a.length;d--;)if(d in a&&a[d]===b)return d;return-1};b.range=function(a,b,d){if(arguments.length<=
21
+ 1){b=a||0;a=0}for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;){g[f++]=a;a=a+d}return g};var H=function(){};b.bind=function(a,c){var d,e;if(a.bind===t&&t)return t.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));H.prototype=a.prototype;var b=new H,g=a.apply(b,e.concat(i.call(arguments)));return Object(g)===g?g:b}};b.bindAll=function(a){var c=
22
+ i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);return b.has(d,e)?d[e]:d[e]=a.apply(this,arguments)}};b.delay=function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(null,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,f,g,h,i,j=b.debounce(function(){h=
23
+ g=false},c);return function(){d=this;e=arguments;f||(f=setTimeout(function(){f=null;h&&a.apply(d,e);j()},c));g?h=true:i=a.apply(d,e);j();g=true;return i}};b.debounce=function(a,b,d){var e;return function(){var f=this,g=arguments;d&&!e&&a.apply(f,g);clearTimeout(e);e=setTimeout(function(){e=null;d||a.apply(f,g)},b)}};b.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments,0));
24
+ return b.apply(this,d)}};b.compose=function(){var a=arguments;return function(){for(var b=arguments,d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=L||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&
25
+ c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.pick=function(a){var c={};j(b.flatten(i.call(arguments,1)),function(b){b in a&&(c[b]=a[b])});return c};b.defaults=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return r(a,b,[])};b.isEmpty=
26
+ function(a){if(a==null)return true;if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=p||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};b.isArguments=function(a){return l.call(a)=="[object Arguments]"};b.isArguments(arguments)||(b.isArguments=function(a){return!(!a||!b.has(a,"callee"))});b.isFunction=function(a){return l.call(a)=="[object Function]"};
27
+ b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isFinite=function(a){return b.isNumber(a)&&isFinite(a)};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,
28
+ b){return K.call(a,b)};b.noConflict=function(){s._=I;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};b.result=function(a,c){if(a==null)return null;var d=a[c];return b.isFunction(d)?d.call(a):d};b.mixin=function(a){j(b.functions(a),function(c){M(c,b[c]=a[c])})};var N=0;b.uniqueId=
29
+ function(a){var b=N++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var u=/.^/,n={"\\":"\\","'":"'",r:"\r",n:"\n",t:"\t",u2028:"\u2028",u2029:"\u2029"},v;for(v in n)n[n[v]]=v;var O=/\\|'|\r|\n|\t|\u2028|\u2029/g,P=/\\(\\|'|r|n|t|u2028|u2029)/g,w=function(a){return a.replace(P,function(a,b){return n[b]})};b.template=function(a,c,d){d=b.defaults(d||{},b.templateSettings);a="__p+='"+a.replace(O,function(a){return"\\"+n[a]}).replace(d.escape||
30
+ u,function(a,b){return"'+\n_.escape("+w(b)+")+\n'"}).replace(d.interpolate||u,function(a,b){return"'+\n("+w(b)+")+\n'"}).replace(d.evaluate||u,function(a,b){return"';\n"+w(b)+"\n;__p+='"})+"';\n";d.variable||(a="with(obj||{}){\n"+a+"}\n");var a="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+a+"return __p;\n",e=new Function(d.variable||"obj","_",a);if(c)return e(c,b);c=function(a){return e.call(this,a,b)};c.source="function("+(d.variable||"obj")+"){\n"+a+"}";return c};
31
+ b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var x=function(a,c){return c?b(a).chain():a},M=function(a,c){m.prototype[a]=function(){var a=i.call(arguments);J.call(a,this._wrapped);return x(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return x(d,
32
+ this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return x(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);
@@ -0,0 +1,2090 @@
1
+ $(function() {
2
+
3
+ // Helper function for vertically aligning DOM elements
4
+ // http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/
5
+ $.fn.vAlign = function() {
6
+ return this.each(function(i){
7
+ var ah = $(this).height();
8
+ var ph = $(this).parent().height();
9
+ var mh = (ph - ah) / 2;
10
+ $(this).css('margin-top', mh);
11
+ });
12
+ };
13
+
14
+ $.fn.stretchFormtasticInputWidthToParent = function() {
15
+ return this.each(function(i){
16
+ var p_width = $(this).closest("form").innerWidth();
17
+ var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest("form").css('padding-right'), 10);
18
+ var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);
19
+ $(this).css('width', p_width - p_padding - this_padding);
20
+ });
21
+ };
22
+
23
+ $('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent();
24
+
25
+ // Vertically center these paragraphs
26
+ // Parent may need a min-height for this to work..
27
+ $('ul.downplayed li div.content p').vAlign();
28
+
29
+ // When a sandbox form is submitted..
30
+ $("form.sandbox").submit(function(){
31
+
32
+ var error_free = true;
33
+
34
+ // Cycle through the forms required inputs
35
+ $(this).find("input.required").each(function() {
36
+
37
+ // Remove any existing error styles from the input
38
+ $(this).removeClass('error');
39
+
40
+ // Tack the error style on if the input is empty..
41
+ if ($(this).val() == '') {
42
+ $(this).addClass('error');
43
+ $(this).wiggle();
44
+ error_free = false;
45
+ }
46
+
47
+ });
48
+
49
+ return error_free;
50
+ });
51
+
52
+ });
53
+
54
+ function clippyCopiedCallback(a) {
55
+ $('#api_key_copied').fadeIn().delay(1000).fadeOut();
56
+
57
+ // var b = $("#clippy_tooltip_" + a);
58
+ // b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() {
59
+ // b.attr("title", "copy to clipboard")
60
+ // },
61
+ // 500))
62
+ }
63
+
64
+ // Logging function that accounts for browsers that don't have window.console
65
+ function log() {
66
+ if (window.console) console.log.apply(console,arguments);
67
+ }
68
+ // Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913)
69
+ if (Function.prototype.bind && console && typeof console.log == "object") {
70
+ [
71
+ "log","info","warn","error","assert","dir","clear","profile","profileEnd"
72
+ ].forEach(function (method) {
73
+ console[method] = this.bind(console[method], console);
74
+ }, Function.prototype.call);
75
+ }
76
+
77
+ var Docs = {
78
+
79
+ shebang: function() {
80
+
81
+ // If shebang has an operation nickname in it..
82
+ // e.g. /docs/#!/words/get_search
83
+ var fragments = $.param.fragment().split('/');
84
+ fragments.shift(); // get rid of the bang
85
+
86
+ switch (fragments.length) {
87
+ case 1:
88
+ // Expand all operations for the resource and scroll to it
89
+ // log('shebang resource:' + fragments[0]);
90
+ var dom_id = 'resource_' + fragments[0];
91
+
92
+ Docs.expandEndpointListForResource(fragments[0]);
93
+ $("#"+dom_id).slideto({highlight: false});
94
+ break;
95
+ case 2:
96
+ // Refer to the endpoint DOM element, e.g. #words_get_search
97
+ // log('shebang endpoint: ' + fragments.join('_'));
98
+
99
+ // Expand Resource
100
+ Docs.expandEndpointListForResource(fragments[0]);
101
+ $("#"+dom_id).slideto({highlight: false});
102
+
103
+ // Expand operation
104
+ var li_dom_id = fragments.join('_');
105
+ var li_content_dom_id = li_dom_id + "_content";
106
+
107
+ // log("li_dom_id " + li_dom_id);
108
+ // log("li_content_dom_id " + li_content_dom_id);
109
+
110
+ Docs.expandOperation($('#'+li_content_dom_id));
111
+ $('#'+li_dom_id).slideto({highlight: false});
112
+ break;
113
+ }
114
+
115
+ },
116
+
117
+ toggleEndpointListForResource: function(resource) {
118
+ var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints');
119
+ if (elem.is(':visible')) {
120
+ Docs.collapseEndpointListForResource(resource);
121
+ } else {
122
+ Docs.expandEndpointListForResource(resource);
123
+ }
124
+ },
125
+
126
+ // Expand resource
127
+ expandEndpointListForResource: function(resource) {
128
+ var resource = Docs.escapeResourceName(resource);
129
+ if (resource == '') {
130
+ $('.resource ul.endpoints').slideDown();
131
+ return;
132
+ }
133
+
134
+ $('li#resource_' + resource).addClass('active');
135
+
136
+ var elem = $('li#resource_' + resource + ' ul.endpoints');
137
+ elem.slideDown();
138
+ },
139
+
140
+ // Collapse resource and mark as explicitly closed
141
+ collapseEndpointListForResource: function(resource) {
142
+ var resource = Docs.escapeResourceName(resource);
143
+ $('li#resource_' + resource).removeClass('active');
144
+
145
+ var elem = $('li#resource_' + resource + ' ul.endpoints');
146
+ elem.slideUp();
147
+ },
148
+
149
+ expandOperationsForResource: function(resource) {
150
+ // Make sure the resource container is open..
151
+ Docs.expandEndpointListForResource(resource);
152
+
153
+ if (resource == '') {
154
+ $('.resource ul.endpoints li.operation div.content').slideDown();
155
+ return;
156
+ }
157
+
158
+ $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {
159
+ Docs.expandOperation($(this));
160
+ });
161
+ },
162
+
163
+ collapseOperationsForResource: function(resource) {
164
+ // Make sure the resource container is open..
165
+ Docs.expandEndpointListForResource(resource);
166
+
167
+ $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {
168
+ Docs.collapseOperation($(this));
169
+ });
170
+ },
171
+
172
+ escapeResourceName: function(resource) {
173
+ return resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g, "\\$&");
174
+ },
175
+
176
+ expandOperation: function(elem) {
177
+ elem.slideDown();
178
+ },
179
+
180
+ collapseOperation: function(elem) {
181
+ elem.slideUp();
182
+ }
183
+
184
+ };
185
+ (function() {
186
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
187
+ templates['content_type'] = template(function (Handlebars,depth0,helpers,partials,data) {
188
+ helpers = helpers || Handlebars.helpers;
189
+ var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0;
190
+
191
+ function program1(depth0,data) {
192
+
193
+ var buffer = "", stack1, stack2;
194
+ buffer += "\n ";
195
+ foundHelper = helpers.produces;
196
+ stack1 = foundHelper || depth0.produces;
197
+ stack2 = helpers.each;
198
+ tmp1 = self.program(2, program2, data);
199
+ tmp1.hash = {};
200
+ tmp1.fn = tmp1;
201
+ tmp1.inverse = self.noop;
202
+ stack1 = stack2.call(depth0, stack1, tmp1);
203
+ if(stack1 || stack1 === 0) { buffer += stack1; }
204
+ buffer += "\n";
205
+ return buffer;}
206
+ function program2(depth0,data) {
207
+
208
+ var buffer = "", stack1;
209
+ buffer += "\n <option value=\"";
210
+ stack1 = depth0;
211
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
212
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this", { hash: {} }); }
213
+ if(stack1 || stack1 === 0) { buffer += stack1; }
214
+ buffer += "\">";
215
+ stack1 = depth0;
216
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
217
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this", { hash: {} }); }
218
+ if(stack1 || stack1 === 0) { buffer += stack1; }
219
+ buffer += "</option>\n ";
220
+ return buffer;}
221
+
222
+ function program4(depth0,data) {
223
+
224
+
225
+ return "\n <option value=\"application/json\">application/json</option>\n";}
226
+
227
+ buffer += "<label for=\"contentType\"></label>\n<select name=\"contentType\">\n";
228
+ foundHelper = helpers.produces;
229
+ stack1 = foundHelper || depth0.produces;
230
+ stack2 = helpers['if'];
231
+ tmp1 = self.program(1, program1, data);
232
+ tmp1.hash = {};
233
+ tmp1.fn = tmp1;
234
+ tmp1.inverse = self.program(4, program4, data);
235
+ stack1 = stack2.call(depth0, stack1, tmp1);
236
+ if(stack1 || stack1 === 0) { buffer += stack1; }
237
+ buffer += "\n</select>\n";
238
+ return buffer;});
239
+ })();
240
+
241
+ (function() {
242
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
243
+ templates['main'] = template(function (Handlebars,depth0,helpers,partials,data) {
244
+ helpers = helpers || Handlebars.helpers;
245
+ var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
246
+
247
+ function program1(depth0,data) {
248
+
249
+ var buffer = "", stack1;
250
+ buffer += "\n , <span style=\"font-variant: small-caps\">api version</span>: ";
251
+ foundHelper = helpers.apiVersion;
252
+ stack1 = foundHelper || depth0.apiVersion;
253
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
254
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "apiVersion", { hash: {} }); }
255
+ buffer += escapeExpression(stack1) + "\n ";
256
+ return buffer;}
257
+
258
+ buffer += "\n<div class='container' id='resources_container'>\n <ul id='resources'>\n </ul>\n\n <div class=\"footer\">\n <br>\n <br>\n <h4 style=\"color: #999\">[ <span style=\"font-variant: small-caps\">base url</span>: ";
259
+ foundHelper = helpers.basePath;
260
+ stack1 = foundHelper || depth0.basePath;
261
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
262
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "basePath", { hash: {} }); }
263
+ buffer += escapeExpression(stack1) + "\n ";
264
+ foundHelper = helpers.apiVersion;
265
+ stack1 = foundHelper || depth0.apiVersion;
266
+ stack2 = helpers['if'];
267
+ tmp1 = self.program(1, program1, data);
268
+ tmp1.hash = {};
269
+ tmp1.fn = tmp1;
270
+ tmp1.inverse = self.noop;
271
+ stack1 = stack2.call(depth0, stack1, tmp1);
272
+ if(stack1 || stack1 === 0) { buffer += stack1; }
273
+ buffer += "]</h4>\n </div>\n</div>\n";
274
+ return buffer;});
275
+ })();
276
+
277
+ (function() {
278
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
279
+ templates['operation'] = template(function (Handlebars,depth0,helpers,partials,data) {
280
+ helpers = helpers || Handlebars.helpers;
281
+ var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
282
+
283
+ function program1(depth0,data) {
284
+
285
+ var buffer = "", stack1;
286
+ buffer += "\n <h4>Implementation Notes</h4>\n <p>";
287
+ foundHelper = helpers.notes;
288
+ stack1 = foundHelper || depth0.notes;
289
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
290
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "notes", { hash: {} }); }
291
+ if(stack1 || stack1 === 0) { buffer += stack1; }
292
+ buffer += "</p>\n ";
293
+ return buffer;}
294
+
295
+ function program3(depth0,data) {
296
+
297
+
298
+ return "\n <h4>Response Class</h4>\n <p><span class=\"model-signature\" /></p>\n <br/>\n <div class=\"content-type\" />\n ";}
299
+
300
+ function program5(depth0,data) {
301
+
302
+
303
+ return "\n <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: 320px; max-width: 330px\">Data Type</th>\n </tr>\n </thead>\n <tbody class=\"operation-params\">\n\n </tbody>\n </table>\n ";}
304
+
305
+ function program7(depth0,data) {
306
+
307
+
308
+ return "\n <div style='margin:0;padding:0;display:inline'></div>\n <h4>Error Status Codes</h4>\n <table class='fullwidth'>\n <thead>\n <tr>\n <th>HTTP Status Code</th>\n <th>Reason</th>\n </tr>\n </thead>\n <tbody class=\"operation-status\">\n \n </tbody>\n </table>\n ";}
309
+
310
+ function program9(depth0,data) {
311
+
312
+
313
+ return "\n ";}
314
+
315
+ function program11(depth0,data) {
316
+
317
+
318
+ return "\n <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 <img alt='Throbber' class='response_throbber' src='../swagger-ui/images/throbber.gif' style='display:none' />\n </div>\n ";}
319
+
320
+ buffer += "\n <ul class='operations' >\n <li class='";
321
+ foundHelper = helpers.httpMethod;
322
+ stack1 = foundHelper || depth0.httpMethod;
323
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
324
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
325
+ buffer += escapeExpression(stack1) + " operation' id='";
326
+ foundHelper = helpers.resourceName;
327
+ stack1 = foundHelper || depth0.resourceName;
328
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
329
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "resourceName", { hash: {} }); }
330
+ buffer += escapeExpression(stack1) + "_";
331
+ foundHelper = helpers.nickname;
332
+ stack1 = foundHelper || depth0.nickname;
333
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
334
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "nickname", { hash: {} }); }
335
+ buffer += escapeExpression(stack1) + "_";
336
+ foundHelper = helpers.httpMethod;
337
+ stack1 = foundHelper || depth0.httpMethod;
338
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
339
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
340
+ buffer += escapeExpression(stack1) + "_";
341
+ foundHelper = helpers.number;
342
+ stack1 = foundHelper || depth0.number;
343
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
344
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "number", { hash: {} }); }
345
+ buffer += escapeExpression(stack1) + "'>\n <div class='heading'>\n <h3>\n <span class='http_method'>\n <a href='#!/";
346
+ foundHelper = helpers.resourceName;
347
+ stack1 = foundHelper || depth0.resourceName;
348
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
349
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "resourceName", { hash: {} }); }
350
+ buffer += escapeExpression(stack1) + "/";
351
+ foundHelper = helpers.nickname;
352
+ stack1 = foundHelper || depth0.nickname;
353
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
354
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "nickname", { hash: {} }); }
355
+ buffer += escapeExpression(stack1) + "_";
356
+ foundHelper = helpers.httpMethod;
357
+ stack1 = foundHelper || depth0.httpMethod;
358
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
359
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
360
+ buffer += escapeExpression(stack1) + "_";
361
+ foundHelper = helpers.number;
362
+ stack1 = foundHelper || depth0.number;
363
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
364
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "number", { hash: {} }); }
365
+ buffer += escapeExpression(stack1) + "' class=\"toggleOperation\">";
366
+ foundHelper = helpers.httpMethod;
367
+ stack1 = foundHelper || depth0.httpMethod;
368
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
369
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
370
+ buffer += escapeExpression(stack1) + "</a>\n </span>\n <span class='path'>\n <a href='#!/";
371
+ foundHelper = helpers.resourceName;
372
+ stack1 = foundHelper || depth0.resourceName;
373
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
374
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "resourceName", { hash: {} }); }
375
+ buffer += escapeExpression(stack1) + "/";
376
+ foundHelper = helpers.nickname;
377
+ stack1 = foundHelper || depth0.nickname;
378
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
379
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "nickname", { hash: {} }); }
380
+ buffer += escapeExpression(stack1) + "_";
381
+ foundHelper = helpers.httpMethod;
382
+ stack1 = foundHelper || depth0.httpMethod;
383
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
384
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
385
+ buffer += escapeExpression(stack1) + "_";
386
+ foundHelper = helpers.number;
387
+ stack1 = foundHelper || depth0.number;
388
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
389
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "number", { hash: {} }); }
390
+ buffer += escapeExpression(stack1) + "' class=\"toggleOperation\">";
391
+ foundHelper = helpers.path;
392
+ stack1 = foundHelper || depth0.path;
393
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
394
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "path", { hash: {} }); }
395
+ buffer += escapeExpression(stack1) + "</a>\n </span>\n </h3>\n <ul class='options'>\n <li>\n <a href='#!/";
396
+ foundHelper = helpers.resourceName;
397
+ stack1 = foundHelper || depth0.resourceName;
398
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
399
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "resourceName", { hash: {} }); }
400
+ buffer += escapeExpression(stack1) + "/";
401
+ foundHelper = helpers.nickname;
402
+ stack1 = foundHelper || depth0.nickname;
403
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
404
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "nickname", { hash: {} }); }
405
+ buffer += escapeExpression(stack1) + "_";
406
+ foundHelper = helpers.httpMethod;
407
+ stack1 = foundHelper || depth0.httpMethod;
408
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
409
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
410
+ buffer += escapeExpression(stack1) + "_";
411
+ foundHelper = helpers.number;
412
+ stack1 = foundHelper || depth0.number;
413
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
414
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "number", { hash: {} }); }
415
+ buffer += escapeExpression(stack1) + "' class=\"toggleOperation\">";
416
+ foundHelper = helpers.summary;
417
+ stack1 = foundHelper || depth0.summary;
418
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
419
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "summary", { hash: {} }); }
420
+ if(stack1 || stack1 === 0) { buffer += stack1; }
421
+ buffer += "</a>\n </li>\n </ul>\n </div>\n <div class='content' id='";
422
+ foundHelper = helpers.resourceName;
423
+ stack1 = foundHelper || depth0.resourceName;
424
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
425
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "resourceName", { hash: {} }); }
426
+ buffer += escapeExpression(stack1) + "_";
427
+ foundHelper = helpers.nickname;
428
+ stack1 = foundHelper || depth0.nickname;
429
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
430
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "nickname", { hash: {} }); }
431
+ buffer += escapeExpression(stack1) + "_";
432
+ foundHelper = helpers.httpMethod;
433
+ stack1 = foundHelper || depth0.httpMethod;
434
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
435
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
436
+ buffer += escapeExpression(stack1) + "_";
437
+ foundHelper = helpers.number;
438
+ stack1 = foundHelper || depth0.number;
439
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
440
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "number", { hash: {} }); }
441
+ buffer += escapeExpression(stack1) + "_content' style='display:none'>\n ";
442
+ foundHelper = helpers.notes;
443
+ stack1 = foundHelper || depth0.notes;
444
+ stack2 = helpers['if'];
445
+ tmp1 = self.program(1, program1, data);
446
+ tmp1.hash = {};
447
+ tmp1.fn = tmp1;
448
+ tmp1.inverse = self.noop;
449
+ stack1 = stack2.call(depth0, stack1, tmp1);
450
+ if(stack1 || stack1 === 0) { buffer += stack1; }
451
+ buffer += "\n ";
452
+ foundHelper = helpers.responseClass;
453
+ stack1 = foundHelper || depth0.responseClass;
454
+ stack2 = helpers['if'];
455
+ tmp1 = self.program(3, program3, data);
456
+ tmp1.hash = {};
457
+ tmp1.fn = tmp1;
458
+ tmp1.inverse = self.noop;
459
+ stack1 = stack2.call(depth0, stack1, tmp1);
460
+ if(stack1 || stack1 === 0) { buffer += stack1; }
461
+ buffer += "\n <form accept-charset='UTF-8' class='sandbox'>\n <div style='margin:0;padding:0;display:inline'></div>\n ";
462
+ foundHelper = helpers.parameters;
463
+ stack1 = foundHelper || depth0.parameters;
464
+ stack2 = helpers['if'];
465
+ tmp1 = self.program(5, program5, data);
466
+ tmp1.hash = {};
467
+ tmp1.fn = tmp1;
468
+ tmp1.inverse = self.noop;
469
+ stack1 = stack2.call(depth0, stack1, tmp1);
470
+ if(stack1 || stack1 === 0) { buffer += stack1; }
471
+ buffer += "\n ";
472
+ foundHelper = helpers.errorResponses;
473
+ stack1 = foundHelper || depth0.errorResponses;
474
+ stack2 = helpers['if'];
475
+ tmp1 = self.program(7, program7, data);
476
+ tmp1.hash = {};
477
+ tmp1.fn = tmp1;
478
+ tmp1.inverse = self.noop;
479
+ stack1 = stack2.call(depth0, stack1, tmp1);
480
+ if(stack1 || stack1 === 0) { buffer += stack1; }
481
+ buffer += "\n ";
482
+ foundHelper = helpers.isReadOnly;
483
+ stack1 = foundHelper || depth0.isReadOnly;
484
+ stack2 = helpers['if'];
485
+ tmp1 = self.program(9, program9, data);
486
+ tmp1.hash = {};
487
+ tmp1.fn = tmp1;
488
+ tmp1.inverse = self.program(11, program11, data);
489
+ stack1 = stack2.call(depth0, stack1, tmp1);
490
+ if(stack1 || stack1 === 0) { buffer += stack1; }
491
+ buffer += "\n </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";
492
+ return buffer;});
493
+ })();
494
+
495
+ (function() {
496
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
497
+ templates['param'] = template(function (Handlebars,depth0,helpers,partials,data) {
498
+ helpers = helpers || Handlebars.helpers;
499
+ var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
500
+
501
+ function program1(depth0,data) {
502
+
503
+ var buffer = "", stack1, stack2;
504
+ buffer += "\n ";
505
+ foundHelper = helpers.isFile;
506
+ stack1 = foundHelper || depth0.isFile;
507
+ stack2 = helpers['if'];
508
+ tmp1 = self.program(2, program2, data);
509
+ tmp1.hash = {};
510
+ tmp1.fn = tmp1;
511
+ tmp1.inverse = self.program(4, program4, data);
512
+ stack1 = stack2.call(depth0, stack1, tmp1);
513
+ if(stack1 || stack1 === 0) { buffer += stack1; }
514
+ buffer += "\n ";
515
+ return buffer;}
516
+ function program2(depth0,data) {
517
+
518
+ var buffer = "", stack1;
519
+ buffer += "\n <input type=\"file\" name='";
520
+ foundHelper = helpers.name;
521
+ stack1 = foundHelper || depth0.name;
522
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
523
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
524
+ buffer += escapeExpression(stack1) + "'/>\n ";
525
+ return buffer;}
526
+
527
+ function program4(depth0,data) {
528
+
529
+ var buffer = "", stack1, stack2;
530
+ buffer += "\n ";
531
+ foundHelper = helpers.defaultValue;
532
+ stack1 = foundHelper || depth0.defaultValue;
533
+ stack2 = helpers['if'];
534
+ tmp1 = self.program(5, program5, data);
535
+ tmp1.hash = {};
536
+ tmp1.fn = tmp1;
537
+ tmp1.inverse = self.program(7, program7, data);
538
+ stack1 = stack2.call(depth0, stack1, tmp1);
539
+ if(stack1 || stack1 === 0) { buffer += stack1; }
540
+ buffer += "\n ";
541
+ return buffer;}
542
+ function program5(depth0,data) {
543
+
544
+ var buffer = "", stack1;
545
+ buffer += "\n <textarea class='body-textarea' name='";
546
+ foundHelper = helpers.name;
547
+ stack1 = foundHelper || depth0.name;
548
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
549
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
550
+ buffer += escapeExpression(stack1) + "'>";
551
+ foundHelper = helpers.defaultValue;
552
+ stack1 = foundHelper || depth0.defaultValue;
553
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
554
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
555
+ buffer += escapeExpression(stack1) + "</textarea>\n ";
556
+ return buffer;}
557
+
558
+ function program7(depth0,data) {
559
+
560
+ var buffer = "", stack1;
561
+ buffer += "\n <textarea class='body-textarea' name='";
562
+ foundHelper = helpers.name;
563
+ stack1 = foundHelper || depth0.name;
564
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
565
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
566
+ buffer += escapeExpression(stack1) + "'></textarea>\n <br />\n <div class=\"content-type\" />\n ";
567
+ return buffer;}
568
+
569
+ function program9(depth0,data) {
570
+
571
+ var buffer = "", stack1, stack2;
572
+ buffer += "\n ";
573
+ foundHelper = helpers.defaultValue;
574
+ stack1 = foundHelper || depth0.defaultValue;
575
+ stack2 = helpers['if'];
576
+ tmp1 = self.program(10, program10, data);
577
+ tmp1.hash = {};
578
+ tmp1.fn = tmp1;
579
+ tmp1.inverse = self.program(12, program12, data);
580
+ stack1 = stack2.call(depth0, stack1, tmp1);
581
+ if(stack1 || stack1 === 0) { buffer += stack1; }
582
+ buffer += "\n ";
583
+ return buffer;}
584
+ function program10(depth0,data) {
585
+
586
+ var buffer = "", stack1;
587
+ buffer += "\n <input class='parameter' minlength='0' name='";
588
+ foundHelper = helpers.name;
589
+ stack1 = foundHelper || depth0.name;
590
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
591
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
592
+ buffer += escapeExpression(stack1) + "' placeholder='' type='text' value='";
593
+ foundHelper = helpers.defaultValue;
594
+ stack1 = foundHelper || depth0.defaultValue;
595
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
596
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
597
+ buffer += escapeExpression(stack1) + "'/>\n ";
598
+ return buffer;}
599
+
600
+ function program12(depth0,data) {
601
+
602
+ var buffer = "", stack1;
603
+ buffer += "\n <input class='parameter' minlength='0' name='";
604
+ foundHelper = helpers.name;
605
+ stack1 = foundHelper || depth0.name;
606
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
607
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
608
+ buffer += escapeExpression(stack1) + "' placeholder='' type='text' value=''/>\n ";
609
+ return buffer;}
610
+
611
+ buffer += "<td class='code'>";
612
+ foundHelper = helpers.name;
613
+ stack1 = foundHelper || depth0.name;
614
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
615
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
616
+ buffer += escapeExpression(stack1) + "</td>\n<td>\n\n ";
617
+ foundHelper = helpers.isBody;
618
+ stack1 = foundHelper || depth0.isBody;
619
+ stack2 = helpers['if'];
620
+ tmp1 = self.program(1, program1, data);
621
+ tmp1.hash = {};
622
+ tmp1.fn = tmp1;
623
+ tmp1.inverse = self.program(9, program9, data);
624
+ stack1 = stack2.call(depth0, stack1, tmp1);
625
+ if(stack1 || stack1 === 0) { buffer += stack1; }
626
+ buffer += "\n\n</td>\n<td>";
627
+ foundHelper = helpers.description;
628
+ stack1 = foundHelper || depth0.description;
629
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
630
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }
631
+ if(stack1 || stack1 === 0) { buffer += stack1; }
632
+ buffer += "</td>\n<td>\n <span class=\"model-signature\"></span>\n</td>\n\n";
633
+ return buffer;});
634
+ })();
635
+
636
+ (function() {
637
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
638
+ templates['param_list'] = template(function (Handlebars,depth0,helpers,partials,data) {
639
+ helpers = helpers || Handlebars.helpers;
640
+ var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
641
+
642
+ function program1(depth0,data) {
643
+
644
+
645
+ return "\n ";}
646
+
647
+ function program3(depth0,data) {
648
+
649
+ var buffer = "", stack1, stack2;
650
+ buffer += "\n ";
651
+ foundHelper = helpers.defaultValue;
652
+ stack1 = foundHelper || depth0.defaultValue;
653
+ stack2 = helpers['if'];
654
+ tmp1 = self.program(4, program4, data);
655
+ tmp1.hash = {};
656
+ tmp1.fn = tmp1;
657
+ tmp1.inverse = self.program(6, program6, data);
658
+ stack1 = stack2.call(depth0, stack1, tmp1);
659
+ if(stack1 || stack1 === 0) { buffer += stack1; }
660
+ buffer += "\n ";
661
+ return buffer;}
662
+ function program4(depth0,data) {
663
+
664
+
665
+ return "\n ";}
666
+
667
+ function program6(depth0,data) {
668
+
669
+
670
+ return "\n <option selected=\"\" value=''></option>\n ";}
671
+
672
+ function program8(depth0,data) {
673
+
674
+ var buffer = "", stack1, stack2;
675
+ buffer += "\n ";
676
+ foundHelper = helpers.isDefault;
677
+ stack1 = foundHelper || depth0.isDefault;
678
+ stack2 = helpers['if'];
679
+ tmp1 = self.program(9, program9, data);
680
+ tmp1.hash = {};
681
+ tmp1.fn = tmp1;
682
+ tmp1.inverse = self.program(11, program11, data);
683
+ stack1 = stack2.call(depth0, stack1, tmp1);
684
+ if(stack1 || stack1 === 0) { buffer += stack1; }
685
+ buffer += "\n ";
686
+ return buffer;}
687
+ function program9(depth0,data) {
688
+
689
+ var buffer = "", stack1;
690
+ buffer += "\n <option value='";
691
+ foundHelper = helpers.value;
692
+ stack1 = foundHelper || depth0.value;
693
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
694
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "value", { hash: {} }); }
695
+ buffer += escapeExpression(stack1) + "'>";
696
+ foundHelper = helpers.value;
697
+ stack1 = foundHelper || depth0.value;
698
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
699
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "value", { hash: {} }); }
700
+ buffer += escapeExpression(stack1) + " (default)</option>\n ";
701
+ return buffer;}
702
+
703
+ function program11(depth0,data) {
704
+
705
+ var buffer = "", stack1;
706
+ buffer += "\n <option value='";
707
+ foundHelper = helpers.value;
708
+ stack1 = foundHelper || depth0.value;
709
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
710
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "value", { hash: {} }); }
711
+ buffer += escapeExpression(stack1) + "'>";
712
+ foundHelper = helpers.value;
713
+ stack1 = foundHelper || depth0.value;
714
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
715
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "value", { hash: {} }); }
716
+ buffer += escapeExpression(stack1) + "</option>\n ";
717
+ return buffer;}
718
+
719
+ buffer += "<td class='code'>";
720
+ foundHelper = helpers.name;
721
+ stack1 = foundHelper || depth0.name;
722
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
723
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
724
+ buffer += escapeExpression(stack1) + "</td>\n<td>\n <select class='parameter' name='";
725
+ foundHelper = helpers.name;
726
+ stack1 = foundHelper || depth0.name;
727
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
728
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
729
+ buffer += escapeExpression(stack1) + "'>\n ";
730
+ foundHelper = helpers.required;
731
+ stack1 = foundHelper || depth0.required;
732
+ stack2 = helpers['if'];
733
+ tmp1 = self.program(1, program1, data);
734
+ tmp1.hash = {};
735
+ tmp1.fn = tmp1;
736
+ tmp1.inverse = self.program(3, program3, data);
737
+ stack1 = stack2.call(depth0, stack1, tmp1);
738
+ if(stack1 || stack1 === 0) { buffer += stack1; }
739
+ buffer += "\n ";
740
+ foundHelper = helpers.allowableValues;
741
+ stack1 = foundHelper || depth0.allowableValues;
742
+ stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.descriptiveValues);
743
+ stack2 = helpers.each;
744
+ tmp1 = self.program(8, program8, data);
745
+ tmp1.hash = {};
746
+ tmp1.fn = tmp1;
747
+ tmp1.inverse = self.noop;
748
+ stack1 = stack2.call(depth0, stack1, tmp1);
749
+ if(stack1 || stack1 === 0) { buffer += stack1; }
750
+ buffer += "\n </select>\n</td>\n<td>";
751
+ foundHelper = helpers.description;
752
+ stack1 = foundHelper || depth0.description;
753
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
754
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }
755
+ if(stack1 || stack1 === 0) { buffer += stack1; }
756
+ buffer += "</td>\n<td><span class=\"model-signature\"></span></td>\n";
757
+ return buffer;});
758
+ })();
759
+
760
+ (function() {
761
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
762
+ templates['param_readonly'] = template(function (Handlebars,depth0,helpers,partials,data) {
763
+ helpers = helpers || Handlebars.helpers;
764
+ var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
765
+
766
+ function program1(depth0,data) {
767
+
768
+ var buffer = "", stack1;
769
+ buffer += "\n <textarea class='body-textarea' readonly='readonly' name='";
770
+ foundHelper = helpers.name;
771
+ stack1 = foundHelper || depth0.name;
772
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
773
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
774
+ buffer += escapeExpression(stack1) + "'>";
775
+ foundHelper = helpers.defaultValue;
776
+ stack1 = foundHelper || depth0.defaultValue;
777
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
778
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
779
+ buffer += escapeExpression(stack1) + "</textarea>\n ";
780
+ return buffer;}
781
+
782
+ function program3(depth0,data) {
783
+
784
+ var buffer = "", stack1, stack2;
785
+ buffer += "\n ";
786
+ foundHelper = helpers.defaultValue;
787
+ stack1 = foundHelper || depth0.defaultValue;
788
+ stack2 = helpers['if'];
789
+ tmp1 = self.program(4, program4, data);
790
+ tmp1.hash = {};
791
+ tmp1.fn = tmp1;
792
+ tmp1.inverse = self.program(6, program6, data);
793
+ stack1 = stack2.call(depth0, stack1, tmp1);
794
+ if(stack1 || stack1 === 0) { buffer += stack1; }
795
+ buffer += "\n ";
796
+ return buffer;}
797
+ function program4(depth0,data) {
798
+
799
+ var buffer = "", stack1;
800
+ buffer += "\n ";
801
+ foundHelper = helpers.defaultValue;
802
+ stack1 = foundHelper || depth0.defaultValue;
803
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
804
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
805
+ buffer += escapeExpression(stack1) + "\n ";
806
+ return buffer;}
807
+
808
+ function program6(depth0,data) {
809
+
810
+
811
+ return "\n (empty)\n ";}
812
+
813
+ buffer += "<td class='code'>";
814
+ foundHelper = helpers.name;
815
+ stack1 = foundHelper || depth0.name;
816
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
817
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
818
+ buffer += escapeExpression(stack1) + "</td>\n<td>\n ";
819
+ foundHelper = helpers.isBody;
820
+ stack1 = foundHelper || depth0.isBody;
821
+ stack2 = helpers['if'];
822
+ tmp1 = self.program(1, program1, data);
823
+ tmp1.hash = {};
824
+ tmp1.fn = tmp1;
825
+ tmp1.inverse = self.program(3, program3, data);
826
+ stack1 = stack2.call(depth0, stack1, tmp1);
827
+ if(stack1 || stack1 === 0) { buffer += stack1; }
828
+ buffer += "\n</td>\n<td>";
829
+ foundHelper = helpers.description;
830
+ stack1 = foundHelper || depth0.description;
831
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
832
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }
833
+ if(stack1 || stack1 === 0) { buffer += stack1; }
834
+ buffer += "</td>\n<td><span class=\"model-signature\"></span></td>\n";
835
+ return buffer;});
836
+ })();
837
+
838
+ (function() {
839
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
840
+ templates['param_readonly_required'] = template(function (Handlebars,depth0,helpers,partials,data) {
841
+ helpers = helpers || Handlebars.helpers;
842
+ var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
843
+
844
+ function program1(depth0,data) {
845
+
846
+ var buffer = "", stack1;
847
+ buffer += "\n <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='";
848
+ foundHelper = helpers.name;
849
+ stack1 = foundHelper || depth0.name;
850
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
851
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
852
+ buffer += escapeExpression(stack1) + "'>";
853
+ foundHelper = helpers.defaultValue;
854
+ stack1 = foundHelper || depth0.defaultValue;
855
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
856
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
857
+ buffer += escapeExpression(stack1) + "</textarea>\n ";
858
+ return buffer;}
859
+
860
+ function program3(depth0,data) {
861
+
862
+ var buffer = "", stack1, stack2;
863
+ buffer += "\n ";
864
+ foundHelper = helpers.defaultValue;
865
+ stack1 = foundHelper || depth0.defaultValue;
866
+ stack2 = helpers['if'];
867
+ tmp1 = self.program(4, program4, data);
868
+ tmp1.hash = {};
869
+ tmp1.fn = tmp1;
870
+ tmp1.inverse = self.program(6, program6, data);
871
+ stack1 = stack2.call(depth0, stack1, tmp1);
872
+ if(stack1 || stack1 === 0) { buffer += stack1; }
873
+ buffer += "\n ";
874
+ return buffer;}
875
+ function program4(depth0,data) {
876
+
877
+ var buffer = "", stack1;
878
+ buffer += "\n ";
879
+ foundHelper = helpers.defaultValue;
880
+ stack1 = foundHelper || depth0.defaultValue;
881
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
882
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
883
+ buffer += escapeExpression(stack1) + "\n ";
884
+ return buffer;}
885
+
886
+ function program6(depth0,data) {
887
+
888
+
889
+ return "\n (empty)\n ";}
890
+
891
+ buffer += "<td class='code required'>";
892
+ foundHelper = helpers.name;
893
+ stack1 = foundHelper || depth0.name;
894
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
895
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
896
+ buffer += escapeExpression(stack1) + "</td>\n<td>\n ";
897
+ foundHelper = helpers.isBody;
898
+ stack1 = foundHelper || depth0.isBody;
899
+ stack2 = helpers['if'];
900
+ tmp1 = self.program(1, program1, data);
901
+ tmp1.hash = {};
902
+ tmp1.fn = tmp1;
903
+ tmp1.inverse = self.program(3, program3, data);
904
+ stack1 = stack2.call(depth0, stack1, tmp1);
905
+ if(stack1 || stack1 === 0) { buffer += stack1; }
906
+ buffer += "\n</td>\n<td>";
907
+ foundHelper = helpers.description;
908
+ stack1 = foundHelper || depth0.description;
909
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
910
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }
911
+ if(stack1 || stack1 === 0) { buffer += stack1; }
912
+ buffer += "</td>\n<td><span class=\"model-signature\"></span></td>\n";
913
+ return buffer;});
914
+ })();
915
+
916
+ (function() {
917
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
918
+ templates['param_required'] = template(function (Handlebars,depth0,helpers,partials,data) {
919
+ helpers = helpers || Handlebars.helpers;
920
+ var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
921
+
922
+ function program1(depth0,data) {
923
+
924
+ var buffer = "", stack1, stack2;
925
+ buffer += "\n ";
926
+ foundHelper = helpers.isFile;
927
+ stack1 = foundHelper || depth0.isFile;
928
+ stack2 = helpers['if'];
929
+ tmp1 = self.program(2, program2, data);
930
+ tmp1.hash = {};
931
+ tmp1.fn = tmp1;
932
+ tmp1.inverse = self.program(4, program4, data);
933
+ stack1 = stack2.call(depth0, stack1, tmp1);
934
+ if(stack1 || stack1 === 0) { buffer += stack1; }
935
+ buffer += "\n ";
936
+ return buffer;}
937
+ function program2(depth0,data) {
938
+
939
+ var buffer = "", stack1;
940
+ buffer += "\n <input type=\"file\" name='";
941
+ foundHelper = helpers.name;
942
+ stack1 = foundHelper || depth0.name;
943
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
944
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
945
+ buffer += escapeExpression(stack1) + "'/>\n ";
946
+ return buffer;}
947
+
948
+ function program4(depth0,data) {
949
+
950
+ var buffer = "", stack1, stack2;
951
+ buffer += "\n ";
952
+ foundHelper = helpers.defaultValue;
953
+ stack1 = foundHelper || depth0.defaultValue;
954
+ stack2 = helpers['if'];
955
+ tmp1 = self.program(5, program5, data);
956
+ tmp1.hash = {};
957
+ tmp1.fn = tmp1;
958
+ tmp1.inverse = self.program(7, program7, data);
959
+ stack1 = stack2.call(depth0, stack1, tmp1);
960
+ if(stack1 || stack1 === 0) { buffer += stack1; }
961
+ buffer += "\n ";
962
+ return buffer;}
963
+ function program5(depth0,data) {
964
+
965
+ var buffer = "", stack1;
966
+ buffer += "\n <textarea class='body-textarea' placeholder='(required)' name='";
967
+ foundHelper = helpers.name;
968
+ stack1 = foundHelper || depth0.name;
969
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
970
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
971
+ buffer += escapeExpression(stack1) + "'>";
972
+ foundHelper = helpers.defaultValue;
973
+ stack1 = foundHelper || depth0.defaultValue;
974
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
975
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
976
+ buffer += escapeExpression(stack1) + "</textarea>\n ";
977
+ return buffer;}
978
+
979
+ function program7(depth0,data) {
980
+
981
+ var buffer = "", stack1;
982
+ buffer += "\n <textarea class='body-textarea' placeholder='(required)' name='";
983
+ foundHelper = helpers.name;
984
+ stack1 = foundHelper || depth0.name;
985
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
986
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
987
+ buffer += escapeExpression(stack1) + "'></textarea>\n <br />\n <div class=\"content-type\" />\n ";
988
+ return buffer;}
989
+
990
+ function program9(depth0,data) {
991
+
992
+ var buffer = "", stack1, stack2;
993
+ buffer += "\n ";
994
+ foundHelper = helpers.isFile;
995
+ stack1 = foundHelper || depth0.isFile;
996
+ stack2 = helpers['if'];
997
+ tmp1 = self.program(10, program10, data);
998
+ tmp1.hash = {};
999
+ tmp1.fn = tmp1;
1000
+ tmp1.inverse = self.program(12, program12, data);
1001
+ stack1 = stack2.call(depth0, stack1, tmp1);
1002
+ if(stack1 || stack1 === 0) { buffer += stack1; }
1003
+ buffer += "\n ";
1004
+ return buffer;}
1005
+ function program10(depth0,data) {
1006
+
1007
+ var buffer = "", stack1;
1008
+ buffer += "\n <input class='parameter' class='required' type='file' name='";
1009
+ foundHelper = helpers.name;
1010
+ stack1 = foundHelper || depth0.name;
1011
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1012
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
1013
+ buffer += escapeExpression(stack1) + "'/>\n ";
1014
+ return buffer;}
1015
+
1016
+ function program12(depth0,data) {
1017
+
1018
+ var buffer = "", stack1, stack2;
1019
+ buffer += "\n ";
1020
+ foundHelper = helpers.defaultValue;
1021
+ stack1 = foundHelper || depth0.defaultValue;
1022
+ stack2 = helpers['if'];
1023
+ tmp1 = self.program(13, program13, data);
1024
+ tmp1.hash = {};
1025
+ tmp1.fn = tmp1;
1026
+ tmp1.inverse = self.program(15, program15, data);
1027
+ stack1 = stack2.call(depth0, stack1, tmp1);
1028
+ if(stack1 || stack1 === 0) { buffer += stack1; }
1029
+ buffer += "\n ";
1030
+ return buffer;}
1031
+ function program13(depth0,data) {
1032
+
1033
+ var buffer = "", stack1;
1034
+ buffer += "\n <input class='parameter required' minlength='1' name='";
1035
+ foundHelper = helpers.name;
1036
+ stack1 = foundHelper || depth0.name;
1037
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1038
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
1039
+ buffer += escapeExpression(stack1) + "' placeholder='(required)' type='text' value='";
1040
+ foundHelper = helpers.defaultValue;
1041
+ stack1 = foundHelper || depth0.defaultValue;
1042
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1043
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
1044
+ buffer += escapeExpression(stack1) + "'/>\n ";
1045
+ return buffer;}
1046
+
1047
+ function program15(depth0,data) {
1048
+
1049
+ var buffer = "", stack1;
1050
+ buffer += "\n <input class='parameter required' minlength='1' name='";
1051
+ foundHelper = helpers.name;
1052
+ stack1 = foundHelper || depth0.name;
1053
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1054
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
1055
+ buffer += escapeExpression(stack1) + "' placeholder='(required)' type='text' value=''/>\n ";
1056
+ return buffer;}
1057
+
1058
+ buffer += "<td class='code required'>";
1059
+ foundHelper = helpers.name;
1060
+ stack1 = foundHelper || depth0.name;
1061
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1062
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
1063
+ buffer += escapeExpression(stack1) + "</td>\n<td>\n ";
1064
+ foundHelper = helpers.isBody;
1065
+ stack1 = foundHelper || depth0.isBody;
1066
+ stack2 = helpers['if'];
1067
+ tmp1 = self.program(1, program1, data);
1068
+ tmp1.hash = {};
1069
+ tmp1.fn = tmp1;
1070
+ tmp1.inverse = self.program(9, program9, data);
1071
+ stack1 = stack2.call(depth0, stack1, tmp1);
1072
+ if(stack1 || stack1 === 0) { buffer += stack1; }
1073
+ buffer += "\n</td>\n<td>\n <strong>";
1074
+ foundHelper = helpers.description;
1075
+ stack1 = foundHelper || depth0.description;
1076
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1077
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }
1078
+ if(stack1 || stack1 === 0) { buffer += stack1; }
1079
+ buffer += "</strong>\n</td>\n<td><span class=\"model-signature\"></span></td>\n";
1080
+ return buffer;});
1081
+ })();
1082
+
1083
+ (function() {
1084
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
1085
+ templates['resource'] = template(function (Handlebars,depth0,helpers,partials,data) {
1086
+ helpers = helpers || Handlebars.helpers;
1087
+ var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
1088
+
1089
+ buffer += "<div class='heading'>\n <h2>\n <a href='#!/";
1090
+ foundHelper = helpers.name;
1091
+ stack1 = foundHelper || depth0.name;
1092
+
1093
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1094
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
1095
+ buffer += escapeExpression(stack1) + "' onclick=\"Docs.toggleEndpointListForResource('";
1096
+ foundHelper = helpers.name;
1097
+ stack1 = foundHelper || depth0.name;
1098
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1099
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
1100
+ buffer += escapeExpression(stack1) + "');\">/";
1101
+ foundHelper = helpers.name;
1102
+ stack1 = foundHelper || depth0.name;
1103
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1104
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
1105
+ buffer += escapeExpression(stack1) + "</a>\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/";
1106
+ foundHelper = helpers.name;
1107
+ stack1 = foundHelper || depth0.name;
1108
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1109
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
1110
+ buffer += escapeExpression(stack1) + "' id='endpointListTogger_";
1111
+ foundHelper = helpers.name;
1112
+ stack1 = foundHelper || depth0.name;
1113
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1114
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
1115
+ buffer += escapeExpression(stack1) + "'\n onclick=\"Docs.toggleEndpointListForResource('";
1116
+ foundHelper = helpers.name;
1117
+ stack1 = foundHelper || depth0.name;
1118
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1119
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
1120
+ buffer += escapeExpression(stack1) + "');\">Show/Hide</a>\n </li>\n <li>\n <a href='#' onclick=\"Docs.collapseOperationsForResource('";
1121
+ foundHelper = helpers.name;
1122
+ stack1 = foundHelper || depth0.name;
1123
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1124
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
1125
+ buffer += escapeExpression(stack1) + "'); return false;\">\n List Operations\n </a>\n </li>\n <li>\n <a href='#' onclick=\"Docs.expandOperationsForResource('";
1126
+ foundHelper = helpers.name;
1127
+ stack1 = foundHelper || depth0.name;
1128
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1129
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
1130
+ buffer += escapeExpression(stack1) + "'); return false;\">\n Expand Operations\n </a>\n </li>\n <li>\n <a href='";
1131
+ foundHelper = helpers.url;
1132
+ stack1 = foundHelper || depth0.url;
1133
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1134
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "url", { hash: {} }); }
1135
+ buffer += escapeExpression(stack1) + "'>Raw</a>\n </li>\n </ul>\n</div>\n<ul class='endpoints' id='";
1136
+ foundHelper = helpers.name;
1137
+ stack1 = foundHelper || depth0.name;
1138
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1139
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
1140
+ buffer += escapeExpression(stack1) + "_endpoint_list' style='display:none'>\n\n</ul>\n";
1141
+ return buffer;});
1142
+ })();
1143
+
1144
+ (function() {
1145
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
1146
+ templates['signature'] = template(function (Handlebars,depth0,helpers,partials,data) {
1147
+ helpers = helpers || Handlebars.helpers;
1148
+ var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
1149
+
1150
+
1151
+ buffer += "<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 ";
1152
+ foundHelper = helpers.signature;
1153
+ stack1 = foundHelper || depth0.signature;
1154
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1155
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "signature", { hash: {} }); }
1156
+ if(stack1 || stack1 === 0) { buffer += stack1; }
1157
+ buffer += "\n </div>\n\n <div class=\"snippet\">\n <pre><code>";
1158
+ foundHelper = helpers.sampleJSON;
1159
+ stack1 = foundHelper || depth0.sampleJSON;
1160
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1161
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "sampleJSON", { hash: {} }); }
1162
+ buffer += escapeExpression(stack1) + "</code></pre>\n <small class=\"notice\"></small>\n </div>\n</div>\n\n";
1163
+ return buffer;});
1164
+ })();
1165
+
1166
+ (function() {
1167
+ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
1168
+ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials,data) {
1169
+ helpers = helpers || Handlebars.helpers;
1170
+ var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
1171
+
1172
+
1173
+ buffer += "<td width='15%' class='code'>";
1174
+ foundHelper = helpers.code;
1175
+ stack1 = foundHelper || depth0.code;
1176
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1177
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "code", { hash: {} }); }
1178
+ buffer += escapeExpression(stack1) + "</td>\n<td>";
1179
+ foundHelper = helpers.reason;
1180
+ stack1 = foundHelper || depth0.reason;
1181
+ if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
1182
+ else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "reason", { hash: {} }); }
1183
+ if(stack1 || stack1 === 0) { buffer += stack1; }
1184
+ buffer += "</td>\n\n";
1185
+ return buffer;});
1186
+ })();
1187
+
1188
+
1189
+
1190
+ // Generated by CoffeeScript 1.4.0
1191
+ (function() {
1192
+ var ContentTypeView, HeaderView, MainView, OperationView, ParameterView, ResourceView, SignatureView, StatusCodeView, SwaggerUi,
1193
+ __hasProp = {}.hasOwnProperty,
1194
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
1195
+
1196
+ SwaggerUi = (function(_super) {
1197
+
1198
+ __extends(SwaggerUi, _super);
1199
+
1200
+ function SwaggerUi() {
1201
+ return SwaggerUi.__super__.constructor.apply(this, arguments);
1202
+ }
1203
+
1204
+ SwaggerUi.prototype.dom_id = "swagger_ui";
1205
+
1206
+ SwaggerUi.prototype.options = null;
1207
+
1208
+ SwaggerUi.prototype.api = null;
1209
+
1210
+ SwaggerUi.prototype.headerView = null;
1211
+
1212
+ SwaggerUi.prototype.mainView = null;
1213
+
1214
+ SwaggerUi.prototype.initialize = function(options) {
1215
+ var _this = this;
1216
+ if (options == null) {
1217
+ options = {};
1218
+ }
1219
+ if (options.dom_id != null) {
1220
+ this.dom_id = options.dom_id;
1221
+ delete options.dom_id;
1222
+ }
1223
+ if (!($('#' + this.dom_id) != null)) {
1224
+ $('body').append('<div id="' + this.dom_id + '"></div>');
1225
+ }
1226
+ this.options = options;
1227
+ this.options.success = function() {
1228
+ return _this.render();
1229
+ };
1230
+ this.options.progress = function(d) {
1231
+ return _this.showMessage(d);
1232
+ };
1233
+ this.options.failure = function(d) {
1234
+ return _this.onLoadFailure(d);
1235
+ };
1236
+ this.headerView = new HeaderView({
1237
+ el: $('#header')
1238
+ });
1239
+ return this.headerView.on('update-swagger-ui', function(data) {
1240
+ return _this.updateSwaggerUi(data);
1241
+ });
1242
+ };
1243
+
1244
+ SwaggerUi.prototype.updateSwaggerUi = function(data) {
1245
+ this.options.discoveryUrl = data.discoveryUrl;
1246
+ this.options.apiKey = data.apiKey;
1247
+ return this.load();
1248
+ };
1249
+
1250
+ SwaggerUi.prototype.load = function() {
1251
+ var _ref;
1252
+ if ((_ref = this.mainView) != null) {
1253
+ _ref.clear();
1254
+ }
1255
+ this.headerView.update(this.options.discoveryUrl, this.options.apiKey);
1256
+ return this.api = new SwaggerApi(this.options);
1257
+ };
1258
+
1259
+ SwaggerUi.prototype.render = function() {
1260
+ var _this = this;
1261
+ this.showMessage('Finished Loading Resource Information. Rendering Swagger UI...');
1262
+ this.mainView = new MainView({
1263
+ model: this.api,
1264
+ el: $('#' + this.dom_id)
1265
+ }).render();
1266
+ this.showMessage();
1267
+ switch (this.options.docExpansion) {
1268
+ case "full":
1269
+ Docs.expandOperationsForResource('');
1270
+ break;
1271
+ case "list":
1272
+ Docs.collapseOperationsForResource('');
1273
+ }
1274
+ if (this.options.onComplete) {
1275
+ this.options.onComplete(this.api, this);
1276
+ }
1277
+ return setTimeout(function() {
1278
+ return Docs.shebang();
1279
+ }, 400);
1280
+ };
1281
+
1282
+ SwaggerUi.prototype.showMessage = function(data) {
1283
+ if (data == null) {
1284
+ data = '';
1285
+ }
1286
+ $('#message-bar').removeClass('message-fail');
1287
+ $('#message-bar').addClass('message-success');
1288
+ return $('#message-bar').html(data);
1289
+ };
1290
+
1291
+ SwaggerUi.prototype.onLoadFailure = function(data) {
1292
+ var val;
1293
+ if (data == null) {
1294
+ data = '';
1295
+ }
1296
+ $('#message-bar').removeClass('message-success');
1297
+ $('#message-bar').addClass('message-fail');
1298
+ val = $('#message-bar').html(data);
1299
+ if (this.options.onFailure != null) {
1300
+ this.options.onFailure(data);
1301
+ }
1302
+ return val;
1303
+ };
1304
+
1305
+ return SwaggerUi;
1306
+
1307
+ })(Backbone.Router);
1308
+
1309
+ window.SwaggerUi = SwaggerUi;
1310
+
1311
+ HeaderView = (function(_super) {
1312
+
1313
+ __extends(HeaderView, _super);
1314
+
1315
+ function HeaderView() {
1316
+ return HeaderView.__super__.constructor.apply(this, arguments);
1317
+ }
1318
+
1319
+ HeaderView.prototype.events = {
1320
+ 'click #show-pet-store-icon': 'showPetStore',
1321
+ 'click #show-wordnik-dev-icon': 'showWordnikDev',
1322
+ 'click #explore': 'showCustom',
1323
+ 'keyup #input_baseUrl': 'showCustomOnKeyup',
1324
+ 'keyup #input_apiKey': 'showCustomOnKeyup'
1325
+ };
1326
+
1327
+ HeaderView.prototype.initialize = function() {};
1328
+
1329
+ HeaderView.prototype.showPetStore = function(e) {
1330
+ return this.trigger('update-swagger-ui', {
1331
+ discoveryUrl: "http://petstore.swagger.wordnik.com/api/api-docs.json",
1332
+ apiKey: "special-key"
1333
+ });
1334
+ };
1335
+
1336
+ HeaderView.prototype.showWordnikDev = function(e) {
1337
+ return this.trigger('update-swagger-ui', {
1338
+ discoveryUrl: "http://api.wordnik.com/v4/resources.json",
1339
+ apiKey: ""
1340
+ });
1341
+ };
1342
+
1343
+ HeaderView.prototype.showCustomOnKeyup = function(e) {
1344
+ if (e.keyCode === 13) {
1345
+ return this.showCustom();
1346
+ }
1347
+ };
1348
+
1349
+ HeaderView.prototype.showCustom = function(e) {
1350
+ if (e != null) {
1351
+ e.preventDefault();
1352
+ }
1353
+ return this.trigger('update-swagger-ui', {
1354
+ discoveryUrl: $('#input_baseUrl').val(),
1355
+ apiKey: $('#input_apiKey').val()
1356
+ });
1357
+ };
1358
+
1359
+ HeaderView.prototype.update = function(url, apiKey, trigger) {
1360
+ if (trigger == null) {
1361
+ trigger = false;
1362
+ }
1363
+ $('#input_baseUrl').val(url);
1364
+ $('#input_apiKey').val(apiKey);
1365
+ if (trigger) {
1366
+ return this.trigger('update-swagger-ui', {
1367
+ discoveryUrl: url,
1368
+ apiKey: apiKey
1369
+ });
1370
+ }
1371
+ };
1372
+
1373
+ return HeaderView;
1374
+
1375
+ })(Backbone.View);
1376
+
1377
+ MainView = (function(_super) {
1378
+
1379
+ __extends(MainView, _super);
1380
+
1381
+ function MainView() {
1382
+ return MainView.__super__.constructor.apply(this, arguments);
1383
+ }
1384
+
1385
+ MainView.prototype.initialize = function() {};
1386
+
1387
+ MainView.prototype.render = function() {
1388
+ var resource, _i, _len, _ref;
1389
+ $(this.el).html(Handlebars.templates.main(this.model));
1390
+ _ref = this.model.apisArray;
1391
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1392
+ resource = _ref[_i];
1393
+ this.addResource(resource);
1394
+ }
1395
+ return this;
1396
+ };
1397
+
1398
+ MainView.prototype.addResource = function(resource) {
1399
+ var resourceView;
1400
+ resourceView = new ResourceView({
1401
+ model: resource,
1402
+ tagName: 'li',
1403
+ id: 'resource_' + resource.name,
1404
+ className: 'resource'
1405
+ });
1406
+ return $('#resources').append(resourceView.render().el);
1407
+ };
1408
+
1409
+ MainView.prototype.clear = function() {
1410
+ return $(this.el).html('');
1411
+ };
1412
+
1413
+ return MainView;
1414
+
1415
+ })(Backbone.View);
1416
+
1417
+ ResourceView = (function(_super) {
1418
+
1419
+ __extends(ResourceView, _super);
1420
+
1421
+ function ResourceView() {
1422
+ return ResourceView.__super__.constructor.apply(this, arguments);
1423
+ }
1424
+
1425
+ ResourceView.prototype.initialize = function() {};
1426
+
1427
+ ResourceView.prototype.render = function() {
1428
+ var operation, _i, _len, _ref;
1429
+ $(this.el).html(Handlebars.templates.resource(this.model));
1430
+ this.number = 0;
1431
+ _ref = this.model.operationsArray;
1432
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1433
+ operation = _ref[_i];
1434
+ this.addOperation(operation);
1435
+ }
1436
+ return this;
1437
+ };
1438
+
1439
+ ResourceView.prototype.addOperation = function(operation) {
1440
+ var operationView;
1441
+ operation.number = this.number;
1442
+ operationView = new OperationView({
1443
+ model: operation,
1444
+ tagName: 'li',
1445
+ className: 'endpoint'
1446
+ });
1447
+ $('.endpoints', $(this.el)).append(operationView.render().el);
1448
+ return this.number++;
1449
+ };
1450
+
1451
+ return ResourceView;
1452
+
1453
+ })(Backbone.View);
1454
+
1455
+ OperationView = (function(_super) {
1456
+
1457
+ __extends(OperationView, _super);
1458
+
1459
+ function OperationView() {
1460
+ return OperationView.__super__.constructor.apply(this, arguments);
1461
+ }
1462
+
1463
+ OperationView.prototype.events = {
1464
+ 'submit .sandbox': 'submitOperation',
1465
+ 'click .submit': 'submitOperation',
1466
+ 'click .response_hider': 'hideResponse',
1467
+ 'click .toggleOperation': 'toggleOperationContent'
1468
+ };
1469
+
1470
+ OperationView.prototype.initialize = function() {};
1471
+
1472
+ OperationView.prototype.render = function() {
1473
+ var contentTypeModel, contentTypeView, isMethodSubmissionSupported, param, responseSignatureView, signatureModel, statusCode, _i, _j, _len, _len1, _ref, _ref1;
1474
+ isMethodSubmissionSupported = jQuery.inArray(this.model.httpMethod, this.model.supportedSubmitMethods()) >= 0;
1475
+ if (!isMethodSubmissionSupported) {
1476
+ this.model.isReadOnly = true;
1477
+ }
1478
+ $(this.el).html(Handlebars.templates.operation(this.model));
1479
+ if (this.model.responseClassSignature && this.model.responseClassSignature !== 'string') {
1480
+ signatureModel = {
1481
+ sampleJSON: this.model.responseSampleJSON,
1482
+ isParam: false,
1483
+ signature: this.model.responseClassSignature
1484
+ };
1485
+ responseSignatureView = new SignatureView({
1486
+ model: signatureModel,
1487
+ tagName: 'div'
1488
+ });
1489
+ $('.model-signature', $(this.el)).append(responseSignatureView.render().el);
1490
+ } else {
1491
+ $('.model-signature', $(this.el)).html(this.model.responseClass);
1492
+ }
1493
+ contentTypeModel = {
1494
+ isParam: false
1495
+ };
1496
+ if (this.model.supportedContentTypes) {
1497
+ contentTypeModel.produces = this.model.supportedContentTypes;
1498
+ }
1499
+ if (this.model.produces) {
1500
+ contentTypeModel.produces = this.model.produces;
1501
+ }
1502
+ contentTypeView = new ContentTypeView({
1503
+ model: contentTypeModel
1504
+ });
1505
+ $('.content-type', $(this.el)).append(contentTypeView.render().el);
1506
+ _ref = this.model.parameters;
1507
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1508
+ param = _ref[_i];
1509
+ this.addParameter(param);
1510
+ }
1511
+ _ref1 = this.model.errorResponses;
1512
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
1513
+ statusCode = _ref1[_j];
1514
+ this.addStatusCode(statusCode);
1515
+ }
1516
+ return this;
1517
+ };
1518
+
1519
+ OperationView.prototype.addParameter = function(param) {
1520
+ var paramView;
1521
+ paramView = new ParameterView({
1522
+ model: param,
1523
+ tagName: 'tr',
1524
+ readOnly: this.model.isReadOnly
1525
+ });
1526
+ return $('.operation-params', $(this.el)).append(paramView.render().el);
1527
+ };
1528
+
1529
+ OperationView.prototype.addStatusCode = function(statusCode) {
1530
+ var statusCodeView;
1531
+ statusCodeView = new StatusCodeView({
1532
+ model: statusCode,
1533
+ tagName: 'tr'
1534
+ });
1535
+ return $('.operation-status', $(this.el)).append(statusCodeView.render().el);
1536
+ };
1537
+
1538
+ OperationView.prototype.submitOperation = function(e) {
1539
+ var bodyParam, consumes, error_free, form, headerParams, invocationUrl, isFileUpload, isFormPost, map, o, obj, param, paramContentTypeField, responseContentTypeField, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2, _ref3, _ref4,
1540
+ _this = this;
1541
+ if (e != null) {
1542
+ e.preventDefault();
1543
+ }
1544
+ form = $('.sandbox', $(this.el));
1545
+ error_free = true;
1546
+ form.find("input.required").each(function() {
1547
+ var _this = this;
1548
+ $(this).removeClass("error");
1549
+ if (jQuery.trim($(this).val()) === "") {
1550
+ $(this).addClass("error");
1551
+ $(this).wiggle({
1552
+ callback: function() {
1553
+ return $(_this).focus();
1554
+ }
1555
+ });
1556
+ return error_free = false;
1557
+ }
1558
+ });
1559
+ if (error_free) {
1560
+ map = {};
1561
+ _ref = form.serializeArray();
1562
+ // SwaggerYard changes
1563
+ // Rails expects an array of query paramters to be like this: ids[]=1&ids[]=2
1564
+ // Swagger-ui just concats the elements with a comma: ids=1%2C+2
1565
+ // This is just a quick hack to get things to be Rails friendly.
1566
+ _ref1 = this.model.parameters;
1567
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1568
+ o = _ref[_i];
1569
+ if ((o.value != null) && jQuery.trim(o.value).length > 0) {
1570
+ if (_ref1[_i].allowMultiple) {
1571
+ map[o.name] = o.value.split(",");
1572
+ } else {
1573
+ map[o.name] = o.value;
1574
+ }
1575
+
1576
+ }
1577
+ }
1578
+ // End of changes
1579
+ isFileUpload = form.children().find('input[type~="file"]').size() !== 0;
1580
+ isFormPost = false;
1581
+ consumes = "application/json";
1582
+ if (this.model.consumes && this.model.consumes.length > 0) {
1583
+ consumes = this.model.consumes[0];
1584
+ } else {
1585
+ _ref1 = this.model.parameters;
1586
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
1587
+ o = _ref1[_j];
1588
+ if (o.paramType === 'form') {
1589
+ isFormPost = true;
1590
+ consumes = false;
1591
+ }
1592
+ }
1593
+ if (isFileUpload) {
1594
+ consumes = false;
1595
+ } else if (this.model.httpMethod.toLowerCase() === "post" && isFormPost === false) {
1596
+ consumes = "application/json";
1597
+ }
1598
+ }
1599
+ if (isFileUpload) {
1600
+ bodyParam = new FormData();
1601
+ _ref2 = this.model.parameters;
1602
+ for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
1603
+ param = _ref2[_k];
1604
+ if ((param.paramType === 'body' || 'form') && param.name !== 'file' && param.name !== 'File' && (map[param.name] != null)) {
1605
+ bodyParam.append(param.name, map[param.name]);
1606
+ }
1607
+ }
1608
+ $.each(form.children().find('input[type~="file"]'), function(i, el) {
1609
+ return bodyParam.append($(el).attr('name'), el.files[0]);
1610
+ });
1611
+ console.log(bodyParam);
1612
+ } else if (isFormPost) {
1613
+ bodyParam = new FormData();
1614
+ _ref3 = this.model.parameters;
1615
+ for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {
1616
+ param = _ref3[_l];
1617
+ if (map[param.name] != null) {
1618
+ bodyParam.append(param.name, map[param.name]);
1619
+ }
1620
+ }
1621
+ } else {
1622
+ bodyParam = null;
1623
+ _ref4 = this.model.parameters;
1624
+ for (_m = 0, _len4 = _ref4.length; _m < _len4; _m++) {
1625
+ param = _ref4[_m];
1626
+ if (param.paramType === 'body') {
1627
+ bodyParam = map[param.name];
1628
+ }
1629
+ }
1630
+ }
1631
+ log("bodyParam = " + bodyParam);
1632
+ headerParams = null;
1633
+
1634
+ // SYNCTV specific changes
1635
+ // This is mainly for signatures changes we need to make for the requesting url
1636
+
1637
+ invocationUrl = this.model.supportHeaderParams() ? (headerParams = this.model.getHeaderParams(map), this.model.urlify(map, false)) : this.model.urlify(map, true);
1638
+
1639
+ decodeServerDate = function(string) {
1640
+ if (string === null || string === undefined || string === '') {
1641
+ return null;
1642
+ } else if (!( typeof string == 'string')) {
1643
+ throw "This function takes a String.";
1644
+ } else {
1645
+ var split = string.split(/[-T:Z]/);
1646
+
1647
+ var d = new Date();
1648
+ d.setUTCFullYear(parseInt(split[0], 10));
1649
+ d.setUTCMonth(parseInt(split[1], 10) - 1);
1650
+ d.setUTCDate(parseInt(split[2], 10));
1651
+ d.setUTCHours(parseInt(split[3], 10));
1652
+ d.setUTCMinutes(parseInt(split[4], 10));
1653
+ d.setUTCSeconds(parseInt(split[5], 10));
1654
+ //Server dates are only precise to the second. It's IMPORTANT to set
1655
+ //milliseconds to 0 to avoid false precision; otherwise semantically
1656
+ //identical dates may compare as unequal because they have different
1657
+ //trash in this field!
1658
+ d.setUTCMilliseconds(0);
1659
+ return d;
1660
+ }
1661
+ }
1662
+
1663
+ encodeParamComponent = function(component) {
1664
+ var encode;
1665
+ if ( component instanceof Date) {
1666
+ var encode = Util.encodeServerDate(component);
1667
+
1668
+ return encodeURIComponent(encode);
1669
+ } else {
1670
+ return encodeURIComponent(component.toString());
1671
+ }
1672
+ }
1673
+
1674
+ encodeSigComponent = function(component) {
1675
+ var encode = encodeParamComponent(component)
1676
+
1677
+ //This is a specific substitution just for the sig algorithm's purpose.
1678
+ encode = encode.replace(/\%20/g, "+");
1679
+
1680
+ //These are things that the less specific encoding method used on server
1681
+ //side will escape, but are omitted from encodeURIComponent because
1682
+ //they're legal for its specific purpose.
1683
+ encode = encode.replace(/~/g, "%7E");
1684
+ encode = encode.replace(/!/g, "%21");
1685
+ encode = encode.replace(/\*/g, "%2A");
1686
+ encode = encode.replace(/\(/g, "%28");
1687
+ encode = encode.replace(/\)/g, "%29");
1688
+ encode = encode.replace(/'/g, "%27");
1689
+ return encode;
1690
+ }
1691
+
1692
+ var auth_hash = this.model.auth_hash();
1693
+ map["access_id"] = auth_hash["id"];
1694
+
1695
+ var query_params = [];
1696
+ for (var key in map) {
1697
+ var encodeKey = encodeSigComponent(key);
1698
+ if (map[key] instanceof Array) {
1699
+ for (var i = 0; i < map[key].length; i++) {
1700
+ query_params.push(encodeKey + "%5B%5D=" + encodeSigComponent(map[key][i]));
1701
+ }
1702
+ } else {
1703
+ query_params.push(encodeKey + "=" + encodeSigComponent(map[key]));
1704
+ }
1705
+ }
1706
+
1707
+ query_params.sort();
1708
+ log('query_params ' + query_params);
1709
+ var param_string = query_params.join("&");
1710
+ param_string += auth_hash["secret"];
1711
+ var signature = MD5.hash(param_string);
1712
+ log('signature ' + signature);
1713
+
1714
+ if(Object.keys(map).length == 1) {
1715
+ invocationUrl += "?"
1716
+ } else {
1717
+ invocationUrl += "&"
1718
+ }
1719
+
1720
+ invocationUrl += ("access_id=" + auth_hash["id"] + "&signature=" + signature);
1721
+ // SYNCTV END
1722
+
1723
+ log('submitting ' + invocationUrl);
1724
+ $(".request_url", $(this.el)).html("<pre>" + invocationUrl + "</pre>");
1725
+ $(".response_throbber", $(this.el)).show();
1726
+ obj = {
1727
+ type: this.model.httpMethod,
1728
+ url: invocationUrl,
1729
+ headers: headerParams,
1730
+ data: bodyParam,
1731
+ contentType: consumes,
1732
+ dataType: 'json',
1733
+ processData: false,
1734
+ error: function(xhr, textStatus, error) {
1735
+ return _this.showErrorStatus(xhr, textStatus, error);
1736
+ },
1737
+ success: function(data) {
1738
+ return _this.showResponse(data);
1739
+ },
1740
+ complete: function(data) {
1741
+ return _this.showCompleteStatus(data);
1742
+ }
1743
+ };
1744
+ paramContentTypeField = $("td select[name=contentType]", $(this.el)).val();
1745
+ if (paramContentTypeField) {
1746
+ obj.contentType = paramContentTypeField;
1747
+ }
1748
+ log('content type = ' + obj.contentType);
1749
+ if (!obj.data || (obj.type === 'GET' || obj.type === 'DELETE')) {
1750
+ obj.contentType = false;
1751
+ }
1752
+ log('content type is now = ' + obj.contentType);
1753
+ responseContentTypeField = $('.content > .content-type > div > select[name=contentType]', $(this.el)).val();
1754
+ if (responseContentTypeField) {
1755
+ obj.headers = obj.headers != null ? obj.headers : {};
1756
+ obj.headers.accept = responseContentTypeField;
1757
+ }
1758
+ jQuery.ajax(obj);
1759
+ return false;
1760
+ }
1761
+ };
1762
+
1763
+ OperationView.prototype.hideResponse = function(e) {
1764
+ if (e != null) {
1765
+ e.preventDefault();
1766
+ }
1767
+ $(".response", $(this.el)).slideUp();
1768
+ return $(".response_hider", $(this.el)).fadeOut();
1769
+ };
1770
+
1771
+ OperationView.prototype.showResponse = function(response) {
1772
+ var prettyJson;
1773
+ prettyJson = JSON.stringify(response, null, "\t").replace(/\n/g, "<br>");
1774
+ return $(".response_body", $(this.el)).html(escape(prettyJson));
1775
+ };
1776
+
1777
+ OperationView.prototype.showErrorStatus = function(data) {
1778
+ return this.showStatus(data);
1779
+ };
1780
+
1781
+ OperationView.prototype.showCompleteStatus = function(data) {
1782
+ return this.showStatus(data);
1783
+ };
1784
+
1785
+ OperationView.prototype.formatXml = function(xml) {
1786
+ var contexp, formatted, indent, lastType, lines, ln, pad, reg, transitions, wsexp, _fn, _i, _len;
1787
+ reg = /(>)(<)(\/*)/g;
1788
+ wsexp = /[ ]*(.*)[ ]+\n/g;
1789
+ contexp = /(<.+>)(.+\n)/g;
1790
+ xml = xml.replace(reg, '$1\n$2$3').replace(wsexp, '$1\n').replace(contexp, '$1\n$2');
1791
+ pad = 0;
1792
+ formatted = '';
1793
+ lines = xml.split('\n');
1794
+ indent = 0;
1795
+ lastType = 'other';
1796
+ transitions = {
1797
+ 'single->single': 0,
1798
+ 'single->closing': -1,
1799
+ 'single->opening': 0,
1800
+ 'single->other': 0,
1801
+ 'closing->single': 0,
1802
+ 'closing->closing': -1,
1803
+ 'closing->opening': 0,
1804
+ 'closing->other': 0,
1805
+ 'opening->single': 1,
1806
+ 'opening->closing': 0,
1807
+ 'opening->opening': 1,
1808
+ 'opening->other': 1,
1809
+ 'other->single': 0,
1810
+ 'other->closing': -1,
1811
+ 'other->opening': 0,
1812
+ 'other->other': 0
1813
+ };
1814
+ _fn = function(ln) {
1815
+ var fromTo, j, key, padding, type, types, value;
1816
+ types = {
1817
+ single: Boolean(ln.match(/<.+\/>/)),
1818
+ closing: Boolean(ln.match(/<\/.+>/)),
1819
+ opening: Boolean(ln.match(/<[^!?].*>/))
1820
+ };
1821
+ type = ((function() {
1822
+ var _results;
1823
+ _results = [];
1824
+ for (key in types) {
1825
+ value = types[key];
1826
+ if (value) {
1827
+ _results.push(key);
1828
+ }
1829
+ }
1830
+ return _results;
1831
+ })())[0];
1832
+ type = type === void 0 ? 'other' : type;
1833
+ fromTo = lastType + '->' + type;
1834
+ lastType = type;
1835
+ padding = '';
1836
+ indent += transitions[fromTo];
1837
+ padding = ((function() {
1838
+ var _j, _ref, _results;
1839
+ _results = [];
1840
+ for (j = _j = 0, _ref = indent; 0 <= _ref ? _j < _ref : _j > _ref; j = 0 <= _ref ? ++_j : --_j) {
1841
+ _results.push(' ');
1842
+ }
1843
+ return _results;
1844
+ })()).join('');
1845
+ if (fromTo === 'opening->closing') {
1846
+ return formatted = formatted.substr(0, formatted.length - 1) + ln + '\n';
1847
+ } else {
1848
+ return formatted += padding + ln + '\n';
1849
+ }
1850
+ };
1851
+ for (_i = 0, _len = lines.length; _i < _len; _i++) {
1852
+ ln = lines[_i];
1853
+ _fn(ln);
1854
+ }
1855
+ return formatted;
1856
+ };
1857
+
1858
+ OperationView.prototype.showStatus = function(data) {
1859
+ var code, pre, response_body;
1860
+ try {
1861
+ code = $('<code />').text(JSON.stringify(JSON.parse(data.responseText), null, 2));
1862
+ pre = $('<pre class="json" />').append(code);
1863
+ } catch (error) {
1864
+ code = $('<code />').text(this.formatXml(data.responseText));
1865
+ pre = $('<pre class="xml" />').append(code);
1866
+ }
1867
+ response_body = pre;
1868
+ $(".response_code", $(this.el)).html("<pre>" + data.status + "</pre>");
1869
+ $(".response_body", $(this.el)).html(response_body);
1870
+ $(".response_headers", $(this.el)).html("<pre>" + data.getAllResponseHeaders() + "</pre>");
1871
+ $(".response", $(this.el)).slideDown();
1872
+ $(".response_hider", $(this.el)).show();
1873
+ $(".response_throbber", $(this.el)).hide();
1874
+ return hljs.highlightBlock($('.response_body', $(this.el))[0]);
1875
+ };
1876
+
1877
+ OperationView.prototype.toggleOperationContent = function() {
1878
+ var elem;
1879
+ elem = $('#' + Docs.escapeResourceName(this.model.resourceName) + "_" + this.model.nickname + "_" + this.model.httpMethod + "_" + this.model.number + "_content");
1880
+ if (elem.is(':visible')) {
1881
+ return Docs.collapseOperation(elem);
1882
+ } else {
1883
+ return Docs.expandOperation(elem);
1884
+ }
1885
+ };
1886
+
1887
+ return OperationView;
1888
+
1889
+ })(Backbone.View);
1890
+
1891
+ StatusCodeView = (function(_super) {
1892
+
1893
+ __extends(StatusCodeView, _super);
1894
+
1895
+ function StatusCodeView() {
1896
+ return StatusCodeView.__super__.constructor.apply(this, arguments);
1897
+ }
1898
+
1899
+ StatusCodeView.prototype.initialize = function() {};
1900
+
1901
+ StatusCodeView.prototype.render = function() {
1902
+ var template;
1903
+ template = this.template();
1904
+ $(this.el).html(template(this.model));
1905
+ return this;
1906
+ };
1907
+
1908
+ StatusCodeView.prototype.template = function() {
1909
+ return Handlebars.templates.status_code;
1910
+ };
1911
+
1912
+ return StatusCodeView;
1913
+
1914
+ })(Backbone.View);
1915
+
1916
+ ParameterView = (function(_super) {
1917
+
1918
+ __extends(ParameterView, _super);
1919
+
1920
+ function ParameterView() {
1921
+ return ParameterView.__super__.constructor.apply(this, arguments);
1922
+ }
1923
+
1924
+ ParameterView.prototype.initialize = function() {};
1925
+
1926
+ ParameterView.prototype.render = function() {
1927
+ var contentTypeModel, contentTypeView, signatureModel, signatureView, template;
1928
+ if (this.model.paramType === 'body') {
1929
+ this.model.isBody = true;
1930
+ }
1931
+ if (this.model.dataType === 'file') {
1932
+ this.model.isFile = true;
1933
+ }
1934
+ template = this.template();
1935
+ $(this.el).html(template(this.model));
1936
+ signatureModel = {
1937
+ sampleJSON: this.model.sampleJSON,
1938
+ isParam: true,
1939
+ signature: this.model.signature
1940
+ };
1941
+ if (this.model.sampleJSON) {
1942
+ signatureView = new SignatureView({
1943
+ model: signatureModel,
1944
+ tagName: 'div'
1945
+ });
1946
+ $('.model-signature', $(this.el)).append(signatureView.render().el);
1947
+ } else {
1948
+ $('.model-signature', $(this.el)).html(this.model.signature);
1949
+ }
1950
+ contentTypeModel = {
1951
+ isParam: false
1952
+ };
1953
+ if (this.model.supportedContentTypes) {
1954
+ contentTypeModel.produces = this.model.supportedContentTypes;
1955
+ }
1956
+ if (this.model.produces) {
1957
+ contentTypeModel.produces = this.model.produces;
1958
+ }
1959
+ contentTypeView = new ContentTypeView({
1960
+ model: contentTypeModel
1961
+ });
1962
+ $('.content-type', $(this.el)).append(contentTypeView.render().el);
1963
+ return this;
1964
+ };
1965
+
1966
+ ParameterView.prototype.template = function() {
1967
+ if (this.model.isList) {
1968
+ return Handlebars.templates.param_list;
1969
+ } else {
1970
+ if (this.options.readOnly) {
1971
+ if (this.model.required) {
1972
+ return Handlebars.templates.param_readonly_required;
1973
+ } else {
1974
+ return Handlebars.templates.param_readonly;
1975
+ }
1976
+ } else {
1977
+ if (this.model.required) {
1978
+ return Handlebars.templates.param_required;
1979
+ } else {
1980
+ return Handlebars.templates.param;
1981
+ }
1982
+ }
1983
+ }
1984
+ };
1985
+
1986
+ return ParameterView;
1987
+
1988
+ })(Backbone.View);
1989
+
1990
+ SignatureView = (function(_super) {
1991
+
1992
+ __extends(SignatureView, _super);
1993
+
1994
+ function SignatureView() {
1995
+ return SignatureView.__super__.constructor.apply(this, arguments);
1996
+ }
1997
+
1998
+ SignatureView.prototype.events = {
1999
+ 'click a.description-link': 'switchToDescription',
2000
+ 'click a.snippet-link': 'switchToSnippet',
2001
+ 'mousedown .snippet': 'snippetToTextArea'
2002
+ };
2003
+
2004
+ SignatureView.prototype.initialize = function() {};
2005
+
2006
+ SignatureView.prototype.render = function() {
2007
+ var template;
2008
+ template = this.template();
2009
+ $(this.el).html(template(this.model));
2010
+ this.switchToDescription();
2011
+ this.isParam = this.model.isParam;
2012
+ if (this.isParam) {
2013
+ $('.notice', $(this.el)).text('Click to set as parameter value');
2014
+ }
2015
+ return this;
2016
+ };
2017
+
2018
+ SignatureView.prototype.template = function() {
2019
+ return Handlebars.templates.signature;
2020
+ };
2021
+
2022
+ SignatureView.prototype.switchToDescription = function(e) {
2023
+ if (e != null) {
2024
+ e.preventDefault();
2025
+ }
2026
+ $(".snippet", $(this.el)).hide();
2027
+ $(".description", $(this.el)).show();
2028
+ $('.description-link', $(this.el)).addClass('selected');
2029
+ return $('.snippet-link', $(this.el)).removeClass('selected');
2030
+ };
2031
+
2032
+ SignatureView.prototype.switchToSnippet = function(e) {
2033
+ if (e != null) {
2034
+ e.preventDefault();
2035
+ }
2036
+ $(".description", $(this.el)).hide();
2037
+ $(".snippet", $(this.el)).show();
2038
+ $('.snippet-link', $(this.el)).addClass('selected');
2039
+ return $('.description-link', $(this.el)).removeClass('selected');
2040
+ };
2041
+
2042
+ SignatureView.prototype.snippetToTextArea = function(e) {
2043
+ var textArea;
2044
+ if (this.isParam) {
2045
+ if (e != null) {
2046
+ e.preventDefault();
2047
+ }
2048
+ textArea = $('textarea', $(this.el.parentNode.parentNode.parentNode));
2049
+ if ($.trim(textArea.val()) === '') {
2050
+ return textArea.val(this.model.sampleJSON);
2051
+ }
2052
+ }
2053
+ };
2054
+
2055
+ return SignatureView;
2056
+
2057
+ })(Backbone.View);
2058
+
2059
+ ContentTypeView = (function(_super) {
2060
+
2061
+ __extends(ContentTypeView, _super);
2062
+
2063
+ function ContentTypeView() {
2064
+ return ContentTypeView.__super__.constructor.apply(this, arguments);
2065
+ }
2066
+
2067
+ ContentTypeView.prototype.initialize = function() {};
2068
+
2069
+ ContentTypeView.prototype.render = function() {
2070
+ var template;
2071
+ template = this.template();
2072
+ $(this.el).html(template(this.model));
2073
+ this.isParam = this.model.isParam;
2074
+ if (this.isParam) {
2075
+ $('label[for=contentType]', $(this.el)).text('Parameter content type:');
2076
+ } else {
2077
+ $('label[for=contentType]', $(this.el)).text('Response Content Type');
2078
+ }
2079
+ return this;
2080
+ };
2081
+
2082
+ ContentTypeView.prototype.template = function() {
2083
+ return Handlebars.templates.content_type;
2084
+ };
2085
+
2086
+ return ContentTypeView;
2087
+
2088
+ })(Backbone.View);
2089
+
2090
+ }).call(this);