grape-swagger-ui 0.0.4 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/README.md +22 -14
- data/app/views/layouts/swagger.html.erb +82 -0
- data/grape-swagger-ui.gemspec +0 -1
- data/lib/grape-swagger-ui/version.rb +1 -1
- data/vendor/assets/images/explorer_icons.png +0 -0
- data/vendor/assets/javascripts/lib/handlebars-1.0.0.js +2278 -0
- data/vendor/assets/javascripts/lib/shred.bundle.js +2765 -0
- data/vendor/assets/javascripts/lib/shred/content.js +193 -0
- data/vendor/assets/javascripts/lib/swagger-oauth.js +211 -0
- data/vendor/assets/javascripts/lib/swagger.js +1547 -659
- data/vendor/assets/javascripts/swagger-ui.js +1273 -896
- data/vendor/assets/javascripts/swagger_ui.js +4 -2
- data/vendor/assets/stylesheets/reset.css +125 -0
- data/vendor/assets/stylesheets/screen.css +1216 -1582
- metadata +17 -33
- data/app/views/layouts/swagger.html.haml +0 -49
- data/vendor/assets/javascripts/lib/handlebars-1.0.rc.1.js +0 -1920
- data/vendor/assets/stylesheets/hightlight.default.css +0 -135
@@ -1,3 +1,5 @@
|
|
1
|
+
// swagger-ui.js
|
2
|
+
// version 2.0.23
|
1
3
|
$(function() {
|
2
4
|
|
3
5
|
// Helper function for vertically aligning DOM elements
|
@@ -62,9 +64,14 @@ function clippyCopiedCallback(a) {
|
|
62
64
|
}
|
63
65
|
|
64
66
|
// Logging function that accounts for browsers that don't have window.console
|
65
|
-
function
|
66
|
-
|
67
|
-
|
67
|
+
log = function(){
|
68
|
+
log.history = log.history || [];
|
69
|
+
log.history.push(arguments);
|
70
|
+
if(this.console){
|
71
|
+
console.log( Array.prototype.slice.call(arguments)[0] );
|
72
|
+
}
|
73
|
+
};
|
74
|
+
|
68
75
|
// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913)
|
69
76
|
if (Function.prototype.bind && console && typeof console.log == "object") {
|
70
77
|
[
|
@@ -86,7 +93,7 @@ var Docs = {
|
|
86
93
|
switch (fragments.length) {
|
87
94
|
case 1:
|
88
95
|
// Expand all operations for the resource and scroll to it
|
89
|
-
|
96
|
+
log('shebang resource:' + fragments[0]);
|
90
97
|
var dom_id = 'resource_' + fragments[0];
|
91
98
|
|
92
99
|
Docs.expandEndpointListForResource(fragments[0]);
|
@@ -94,18 +101,18 @@ var Docs = {
|
|
94
101
|
break;
|
95
102
|
case 2:
|
96
103
|
// Refer to the endpoint DOM element, e.g. #words_get_search
|
97
|
-
|
104
|
+
log('shebang endpoint: ' + fragments.join('_'));
|
98
105
|
|
99
|
-
|
100
|
-
|
101
|
-
|
106
|
+
// Expand Resource
|
107
|
+
Docs.expandEndpointListForResource(fragments[0]);
|
108
|
+
$("#"+dom_id).slideto({highlight: false});
|
102
109
|
|
103
|
-
|
110
|
+
// Expand operation
|
104
111
|
var li_dom_id = fragments.join('_');
|
105
112
|
var li_content_dom_id = li_dom_id + "_content";
|
106
113
|
|
107
|
-
|
108
|
-
|
114
|
+
log("li_dom_id " + li_dom_id);
|
115
|
+
log("li_content_dom_id " + li_content_dom_id);
|
109
116
|
|
110
117
|
Docs.expandOperation($('#'+li_content_dom_id));
|
111
118
|
$('#'+li_dom_id).slideto({highlight: false});
|
@@ -180,985 +187,1049 @@ var Docs = {
|
|
180
187
|
collapseOperation: function(elem) {
|
181
188
|
elem.slideUp();
|
182
189
|
}
|
183
|
-
|
184
|
-
};
|
185
|
-
(function() {
|
190
|
+
};(function() {
|
186
191
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
187
192
|
templates['content_type'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
188
|
-
|
189
|
-
|
193
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
194
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
195
|
+
var buffer = "", stack1, functionType="function", self=this;
|
190
196
|
|
191
197
|
function program1(depth0,data) {
|
192
198
|
|
193
|
-
var buffer = "", stack1
|
194
|
-
buffer += "\n
|
195
|
-
|
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);
|
199
|
+
var buffer = "", stack1;
|
200
|
+
buffer += "\n ";
|
201
|
+
stack1 = helpers.each.call(depth0, depth0.produces, {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data});
|
203
202
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
204
203
|
buffer += "\n";
|
205
|
-
return buffer;
|
204
|
+
return buffer;
|
205
|
+
}
|
206
206
|
function program2(depth0,data) {
|
207
207
|
|
208
208
|
var buffer = "", stack1;
|
209
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: {} }); }
|
210
|
+
stack1 = (typeof depth0 === functionType ? depth0.apply(depth0) : depth0);
|
213
211
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
214
212
|
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: {} }); }
|
213
|
+
stack1 = (typeof depth0 === functionType ? depth0.apply(depth0) : depth0);
|
218
214
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
219
215
|
buffer += "</option>\n ";
|
220
|
-
return buffer;
|
216
|
+
return buffer;
|
217
|
+
}
|
221
218
|
|
222
219
|
function program4(depth0,data) {
|
223
220
|
|
224
221
|
|
225
|
-
return "\n
|
222
|
+
return "\n <option value=\"application/json\">application/json</option>\n";
|
223
|
+
}
|
226
224
|
|
227
225
|
buffer += "<label for=\"contentType\"></label>\n<select name=\"contentType\">\n";
|
228
|
-
|
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);
|
226
|
+
stack1 = helpers['if'].call(depth0, depth0.produces, {hash:{},inverse:self.program(4, program4, data),fn:self.program(1, program1, data),data:data});
|
236
227
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
237
228
|
buffer += "\n</select>\n";
|
238
|
-
return buffer;
|
229
|
+
return buffer;
|
230
|
+
});
|
239
231
|
})();
|
240
232
|
|
241
233
|
(function() {
|
242
234
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
243
235
|
templates['main'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
244
|
-
|
245
|
-
|
236
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
237
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
238
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
246
239
|
|
247
240
|
function program1(depth0,data) {
|
248
241
|
|
242
|
+
var buffer = "", stack1, stack2;
|
243
|
+
buffer += "\n <div class=\"info_title\">"
|
244
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.title)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
245
|
+
+ "</div>\n <div class=\"info_description\">";
|
246
|
+
stack2 = ((stack1 = ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.description)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1);
|
247
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
248
|
+
buffer += "</div>\n ";
|
249
|
+
stack2 = helpers['if'].call(depth0, ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.termsOfServiceUrl), {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data});
|
250
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
251
|
+
buffer += "\n ";
|
252
|
+
stack2 = helpers['if'].call(depth0, ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.contact), {hash:{},inverse:self.noop,fn:self.program(4, program4, data),data:data});
|
253
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
254
|
+
buffer += "\n ";
|
255
|
+
stack2 = helpers['if'].call(depth0, ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.license), {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data});
|
256
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
257
|
+
buffer += "\n ";
|
258
|
+
return buffer;
|
259
|
+
}
|
260
|
+
function program2(depth0,data) {
|
261
|
+
|
262
|
+
var buffer = "", stack1;
|
263
|
+
buffer += "<div class=\"info_tos\"><a href=\""
|
264
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.termsOfServiceUrl)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
265
|
+
+ "\">Terms of service</a></div>";
|
266
|
+
return buffer;
|
267
|
+
}
|
268
|
+
|
269
|
+
function program4(depth0,data) {
|
270
|
+
|
271
|
+
var buffer = "", stack1;
|
272
|
+
buffer += "<div class='info_contact'><a href=\"mailto:"
|
273
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.contact)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
274
|
+
+ "\">Contact the developer</a></div>";
|
275
|
+
return buffer;
|
276
|
+
}
|
277
|
+
|
278
|
+
function program6(depth0,data) {
|
279
|
+
|
280
|
+
var buffer = "", stack1;
|
281
|
+
buffer += "<div class='info_license'><a href='"
|
282
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.licenseUrl)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
283
|
+
+ "'>"
|
284
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.license)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
285
|
+
+ "</a></div>";
|
286
|
+
return buffer;
|
287
|
+
}
|
288
|
+
|
289
|
+
function program8(depth0,data) {
|
290
|
+
|
249
291
|
var buffer = "", stack1;
|
250
292
|
buffer += "\n , <span style=\"font-variant: small-caps\">api version</span>: ";
|
251
|
-
|
252
|
-
stack1 =
|
253
|
-
|
254
|
-
|
255
|
-
buffer
|
256
|
-
|
257
|
-
|
258
|
-
buffer += "
|
259
|
-
|
260
|
-
stack1
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
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);
|
293
|
+
if (stack1 = helpers.apiVersion) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
294
|
+
else { stack1 = depth0.apiVersion; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
295
|
+
buffer += escapeExpression(stack1)
|
296
|
+
+ "\n ";
|
297
|
+
return buffer;
|
298
|
+
}
|
299
|
+
|
300
|
+
buffer += "<div class='info' id='api_info'>\n ";
|
301
|
+
stack1 = helpers['if'].call(depth0, depth0.info, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
302
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
303
|
+
buffer += "\n</div>\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>: ";
|
304
|
+
if (stack1 = helpers.basePath) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
305
|
+
else { stack1 = depth0.basePath; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
306
|
+
buffer += escapeExpression(stack1)
|
307
|
+
+ "\n ";
|
308
|
+
stack1 = helpers['if'].call(depth0, depth0.apiVersion, {hash:{},inverse:self.noop,fn:self.program(8, program8, data),data:data});
|
272
309
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
273
310
|
buffer += "]</h4>\n </div>\n</div>\n";
|
274
|
-
return buffer;
|
311
|
+
return buffer;
|
312
|
+
});
|
275
313
|
})();
|
276
314
|
|
277
315
|
(function() {
|
278
316
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
279
317
|
templates['operation'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
280
|
-
|
281
|
-
|
318
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
319
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
320
|
+
var buffer = "", stack1, options, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
|
282
321
|
|
283
322
|
function program1(depth0,data) {
|
284
323
|
|
285
324
|
var buffer = "", stack1;
|
286
|
-
buffer += "\n
|
287
|
-
|
288
|
-
stack1 =
|
289
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
290
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "notes", { hash: {} }); }
|
325
|
+
buffer += "\n <h4>Implementation Notes</h4>\n <p>";
|
326
|
+
if (stack1 = helpers.notes) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
327
|
+
else { stack1 = depth0.notes; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
291
328
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
292
|
-
buffer += "</p>\n
|
293
|
-
return buffer;
|
329
|
+
buffer += "</p>\n ";
|
330
|
+
return buffer;
|
331
|
+
}
|
294
332
|
|
295
333
|
function program3(depth0,data) {
|
296
334
|
|
297
335
|
|
298
|
-
return "\n
|
336
|
+
return "\n <div class=\"auth\">\n <span class=\"api-ic ic-error\"></span>";
|
337
|
+
}
|
299
338
|
|
300
339
|
function program5(depth0,data) {
|
301
340
|
|
341
|
+
var buffer = "", stack1;
|
342
|
+
buffer += "\n <div id=\"api_information_panel\" style=\"top: 526px; left: 776px; display: none;\">\n ";
|
343
|
+
stack1 = helpers.each.call(depth0, depth0, {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data});
|
344
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
345
|
+
buffer += "\n </div>\n ";
|
346
|
+
return buffer;
|
347
|
+
}
|
348
|
+
function program6(depth0,data) {
|
302
349
|
|
303
|
-
|
350
|
+
var buffer = "", stack1, stack2;
|
351
|
+
buffer += "\n <div title='";
|
352
|
+
stack2 = ((stack1 = depth0.description),typeof stack1 === functionType ? stack1.apply(depth0) : stack1);
|
353
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
354
|
+
buffer += "'>"
|
355
|
+
+ escapeExpression(((stack1 = depth0.scope),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
356
|
+
+ "</div>\n ";
|
357
|
+
return buffer;
|
358
|
+
}
|
304
359
|
|
305
|
-
function
|
360
|
+
function program8(depth0,data) {
|
306
361
|
|
307
362
|
|
308
|
-
return "
|
363
|
+
return "</div>";
|
364
|
+
}
|
309
365
|
|
310
|
-
function
|
366
|
+
function program10(depth0,data) {
|
311
367
|
|
312
368
|
|
313
|
-
return "\n
|
369
|
+
return "\n <div class='access'>\n <span class=\"api-ic ic-off\" title=\"click to authenticate\"></span>\n </div>\n ";
|
370
|
+
}
|
314
371
|
|
315
|
-
function
|
372
|
+
function program12(depth0,data) {
|
373
|
+
|
374
|
+
|
375
|
+
return "\n <h4>Response Class</h4>\n <p><span class=\"model-signature\" /></p>\n <br/>\n <div class=\"response-content-type\" />\n ";
|
376
|
+
}
|
377
|
+
|
378
|
+
function program14(depth0,data) {
|
379
|
+
|
380
|
+
|
381
|
+
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: 100px; max-width: 100px\">Parameter Type</th>\n <th style=\"width: 220px; max-width: 230px\">Data Type</th>\n </tr>\n </thead>\n <tbody class=\"operation-params\">\n\n </tbody>\n </table>\n ";
|
382
|
+
}
|
383
|
+
|
384
|
+
function program16(depth0,data) {
|
316
385
|
|
317
386
|
|
318
|
-
return "\n
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
if(
|
339
|
-
else
|
340
|
-
buffer += escapeExpression(stack1)
|
341
|
-
|
342
|
-
stack1 =
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
stack1 =
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
if(
|
359
|
-
else
|
360
|
-
buffer += escapeExpression(stack1)
|
361
|
-
|
362
|
-
stack1 =
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
stack1 =
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
if(
|
379
|
-
else
|
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: {} }); }
|
387
|
+
return "\n <div style='margin:0;padding:0;display:inline'></div>\n <h4>Response Messages</h4>\n <table class='fullwidth'>\n <thead>\n <tr>\n <th>HTTP Status Code</th>\n <th>Reason</th>\n <th>Response Model</th>\n </tr>\n </thead>\n <tbody class=\"operation-status\">\n \n </tbody>\n </table>\n ";
|
388
|
+
}
|
389
|
+
|
390
|
+
function program18(depth0,data) {
|
391
|
+
|
392
|
+
|
393
|
+
return "\n ";
|
394
|
+
}
|
395
|
+
|
396
|
+
function program20(depth0,data) {
|
397
|
+
|
398
|
+
|
399
|
+
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 <span class='response_throbber' style='display:none'></span>\n </div>\n ";
|
400
|
+
}
|
401
|
+
|
402
|
+
buffer += "\n <ul class='operations' >\n <li class='";
|
403
|
+
if (stack1 = helpers.method) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
404
|
+
else { stack1 = depth0.method; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
405
|
+
buffer += escapeExpression(stack1)
|
406
|
+
+ " operation' id='";
|
407
|
+
if (stack1 = helpers.parentId) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
408
|
+
else { stack1 = depth0.parentId; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
409
|
+
buffer += escapeExpression(stack1)
|
410
|
+
+ "_";
|
411
|
+
if (stack1 = helpers.nickname) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
412
|
+
else { stack1 = depth0.nickname; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
413
|
+
buffer += escapeExpression(stack1)
|
414
|
+
+ "'>\n <div class='heading'>\n <h3>\n <span class='http_method'>\n <a href='#!/";
|
415
|
+
if (stack1 = helpers.parentId) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
416
|
+
else { stack1 = depth0.parentId; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
417
|
+
buffer += escapeExpression(stack1)
|
418
|
+
+ "/";
|
419
|
+
if (stack1 = helpers.nickname) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
420
|
+
else { stack1 = depth0.nickname; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
421
|
+
buffer += escapeExpression(stack1)
|
422
|
+
+ "' class=\"toggleOperation\">";
|
423
|
+
if (stack1 = helpers.method) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
424
|
+
else { stack1 = depth0.method; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
425
|
+
buffer += escapeExpression(stack1)
|
426
|
+
+ "</a>\n </span>\n <span class='path'>\n <a href='#!/";
|
427
|
+
if (stack1 = helpers.parentId) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
428
|
+
else { stack1 = depth0.parentId; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
429
|
+
buffer += escapeExpression(stack1)
|
430
|
+
+ "/";
|
431
|
+
if (stack1 = helpers.nickname) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
432
|
+
else { stack1 = depth0.nickname; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
433
|
+
buffer += escapeExpression(stack1)
|
434
|
+
+ "' class=\"toggleOperation\">";
|
435
|
+
if (stack1 = helpers.path) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
436
|
+
else { stack1 = depth0.path; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
437
|
+
buffer += escapeExpression(stack1)
|
438
|
+
+ "</a>\n </span>\n </h3>\n <ul class='options'>\n <li>\n <a href='#!/";
|
439
|
+
if (stack1 = helpers.parentId) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
440
|
+
else { stack1 = depth0.parentId; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
441
|
+
buffer += escapeExpression(stack1)
|
442
|
+
+ "/";
|
443
|
+
if (stack1 = helpers.nickname) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
444
|
+
else { stack1 = depth0.nickname; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
445
|
+
buffer += escapeExpression(stack1)
|
446
|
+
+ "' class=\"toggleOperation\">";
|
447
|
+
if (stack1 = helpers.summary) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
448
|
+
else { stack1 = depth0.summary; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
420
449
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
421
|
-
buffer += "</a>\n
|
422
|
-
|
423
|
-
stack1 =
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
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
|
+
buffer += "</a>\n </li>\n </ul>\n </div>\n <div class='content' id='";
|
451
|
+
if (stack1 = helpers.parentId) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
452
|
+
else { stack1 = depth0.parentId; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
453
|
+
buffer += escapeExpression(stack1)
|
454
|
+
+ "_";
|
455
|
+
if (stack1 = helpers.nickname) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
456
|
+
else { stack1 = depth0.nickname; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
457
|
+
buffer += escapeExpression(stack1)
|
458
|
+
+ "_content' style='display:none'>\n ";
|
459
|
+
stack1 = helpers['if'].call(depth0, depth0.notes, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
450
460
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
451
|
-
buffer += "\n
|
452
|
-
|
453
|
-
stack1 =
|
454
|
-
|
455
|
-
|
456
|
-
tmp1.hash = {};
|
457
|
-
tmp1.fn = tmp1;
|
458
|
-
tmp1.inverse = self.noop;
|
459
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
461
|
+
buffer += "\n ";
|
462
|
+
options = {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data};
|
463
|
+
if (stack1 = helpers.oauth) { stack1 = stack1.call(depth0, options); }
|
464
|
+
else { stack1 = depth0.oauth; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
465
|
+
if (!helpers.oauth) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
|
460
466
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
461
|
-
buffer += "\n
|
462
|
-
|
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);
|
467
|
+
buffer += "\n ";
|
468
|
+
stack1 = helpers.each.call(depth0, depth0.oauth, {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data});
|
470
469
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
471
|
-
buffer += "\n
|
472
|
-
|
473
|
-
stack1 =
|
474
|
-
|
475
|
-
|
476
|
-
tmp1.hash = {};
|
477
|
-
tmp1.fn = tmp1;
|
478
|
-
tmp1.inverse = self.noop;
|
479
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
470
|
+
buffer += "\n ";
|
471
|
+
options = {hash:{},inverse:self.noop,fn:self.program(8, program8, data),data:data};
|
472
|
+
if (stack1 = helpers.oauth) { stack1 = stack1.call(depth0, options); }
|
473
|
+
else { stack1 = depth0.oauth; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
474
|
+
if (!helpers.oauth) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
|
480
475
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
481
|
-
buffer += "\n
|
482
|
-
|
483
|
-
stack1 =
|
484
|
-
|
485
|
-
|
486
|
-
tmp1.hash = {};
|
487
|
-
tmp1.fn = tmp1;
|
488
|
-
tmp1.inverse = self.program(11, program11, data);
|
489
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
476
|
+
buffer += "\n ";
|
477
|
+
options = {hash:{},inverse:self.noop,fn:self.program(10, program10, data),data:data};
|
478
|
+
if (stack1 = helpers.oauth) { stack1 = stack1.call(depth0, options); }
|
479
|
+
else { stack1 = depth0.oauth; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
480
|
+
if (!helpers.oauth) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
|
490
481
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
491
|
-
buffer += "\n
|
492
|
-
|
482
|
+
buffer += "\n ";
|
483
|
+
stack1 = helpers['if'].call(depth0, depth0.type, {hash:{},inverse:self.noop,fn:self.program(12, program12, data),data:data});
|
484
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
485
|
+
buffer += "\n <form accept-charset='UTF-8' class='sandbox'>\n <div style='margin:0;padding:0;display:inline'></div>\n ";
|
486
|
+
stack1 = helpers['if'].call(depth0, depth0.parameters, {hash:{},inverse:self.noop,fn:self.program(14, program14, data),data:data});
|
487
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
488
|
+
buffer += "\n ";
|
489
|
+
stack1 = helpers['if'].call(depth0, depth0.responseMessages, {hash:{},inverse:self.noop,fn:self.program(16, program16, data),data:data});
|
490
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
491
|
+
buffer += "\n ";
|
492
|
+
stack1 = helpers['if'].call(depth0, depth0.isReadOnly, {hash:{},inverse:self.program(20, program20, data),fn:self.program(18, program18, data),data:data});
|
493
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
494
|
+
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";
|
495
|
+
return buffer;
|
496
|
+
});
|
493
497
|
})();
|
494
498
|
|
495
499
|
(function() {
|
496
500
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
497
501
|
templates['param'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
498
|
-
|
499
|
-
|
502
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
503
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
504
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
500
505
|
|
501
506
|
function program1(depth0,data) {
|
502
507
|
|
503
|
-
var buffer = "", stack1
|
508
|
+
var buffer = "", stack1;
|
504
509
|
buffer += "\n ";
|
505
|
-
|
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);
|
510
|
+
stack1 = helpers['if'].call(depth0, depth0.isFile, {hash:{},inverse:self.program(4, program4, data),fn:self.program(2, program2, data),data:data});
|
513
511
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
514
512
|
buffer += "\n ";
|
515
|
-
return buffer;
|
513
|
+
return buffer;
|
514
|
+
}
|
516
515
|
function program2(depth0,data) {
|
517
516
|
|
518
517
|
var buffer = "", stack1;
|
519
518
|
buffer += "\n <input type=\"file\" name='";
|
520
|
-
|
521
|
-
stack1 =
|
522
|
-
|
523
|
-
|
524
|
-
buffer
|
525
|
-
|
519
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
520
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
521
|
+
buffer += escapeExpression(stack1)
|
522
|
+
+ "'/>\n <div class=\"parameter-content-type\" />\n ";
|
523
|
+
return buffer;
|
524
|
+
}
|
526
525
|
|
527
526
|
function program4(depth0,data) {
|
528
527
|
|
529
|
-
var buffer = "", stack1
|
528
|
+
var buffer = "", stack1;
|
530
529
|
buffer += "\n ";
|
531
|
-
|
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);
|
530
|
+
stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data});
|
539
531
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
540
532
|
buffer += "\n ";
|
541
|
-
return buffer;
|
533
|
+
return buffer;
|
534
|
+
}
|
542
535
|
function program5(depth0,data) {
|
543
536
|
|
544
537
|
var buffer = "", stack1;
|
545
538
|
buffer += "\n <textarea class='body-textarea' name='";
|
546
|
-
|
547
|
-
stack1 =
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
return buffer;}
|
539
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
540
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
541
|
+
buffer += escapeExpression(stack1)
|
542
|
+
+ "'>";
|
543
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
544
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
545
|
+
buffer += escapeExpression(stack1)
|
546
|
+
+ "</textarea>\n ";
|
547
|
+
return buffer;
|
548
|
+
}
|
557
549
|
|
558
550
|
function program7(depth0,data) {
|
559
551
|
|
560
552
|
var buffer = "", stack1;
|
561
553
|
buffer += "\n <textarea class='body-textarea' name='";
|
562
|
-
|
563
|
-
stack1 =
|
564
|
-
|
565
|
-
|
566
|
-
buffer
|
567
|
-
|
554
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
555
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
556
|
+
buffer += escapeExpression(stack1)
|
557
|
+
+ "'></textarea>\n <br />\n <div class=\"parameter-content-type\" />\n ";
|
558
|
+
return buffer;
|
559
|
+
}
|
568
560
|
|
569
561
|
function program9(depth0,data) {
|
570
562
|
|
571
|
-
var buffer = "", stack1
|
563
|
+
var buffer = "", stack1;
|
572
564
|
buffer += "\n ";
|
573
|
-
|
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);
|
565
|
+
stack1 = helpers['if'].call(depth0, depth0.isFile, {hash:{},inverse:self.program(10, program10, data),fn:self.program(2, program2, data),data:data});
|
581
566
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
582
567
|
buffer += "\n ";
|
583
|
-
return buffer;
|
568
|
+
return buffer;
|
569
|
+
}
|
584
570
|
function program10(depth0,data) {
|
585
571
|
|
586
572
|
var buffer = "", stack1;
|
587
|
-
buffer += "\n
|
588
|
-
|
589
|
-
stack1
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
573
|
+
buffer += "\n ";
|
574
|
+
stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(13, program13, data),fn:self.program(11, program11, data),data:data});
|
575
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
576
|
+
buffer += "\n ";
|
577
|
+
return buffer;
|
578
|
+
}
|
579
|
+
function program11(depth0,data) {
|
580
|
+
|
581
|
+
var buffer = "", stack1;
|
582
|
+
buffer += "\n <input class='parameter' minlength='0' name='";
|
583
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
584
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
585
|
+
buffer += escapeExpression(stack1)
|
586
|
+
+ "' placeholder='' type='text' value='";
|
587
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
588
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
589
|
+
buffer += escapeExpression(stack1)
|
590
|
+
+ "'/>\n ";
|
591
|
+
return buffer;
|
592
|
+
}
|
599
593
|
|
600
|
-
function
|
594
|
+
function program13(depth0,data) {
|
601
595
|
|
602
596
|
var buffer = "", stack1;
|
603
|
-
buffer += "\n
|
604
|
-
|
605
|
-
stack1 =
|
606
|
-
|
607
|
-
|
608
|
-
buffer
|
609
|
-
|
597
|
+
buffer += "\n <input class='parameter' minlength='0' name='";
|
598
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
599
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
600
|
+
buffer += escapeExpression(stack1)
|
601
|
+
+ "' placeholder='' type='text' value=''/>\n ";
|
602
|
+
return buffer;
|
603
|
+
}
|
610
604
|
|
611
605
|
buffer += "<td class='code'>";
|
612
|
-
|
613
|
-
stack1 =
|
614
|
-
|
615
|
-
|
616
|
-
|
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);
|
606
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
607
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
608
|
+
buffer += escapeExpression(stack1)
|
609
|
+
+ "</td>\n<td>\n\n ";
|
610
|
+
stack1 = helpers['if'].call(depth0, depth0.isBody, {hash:{},inverse:self.program(9, program9, data),fn:self.program(1, program1, data),data:data});
|
625
611
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
626
612
|
buffer += "\n\n</td>\n<td>";
|
627
|
-
|
628
|
-
stack1 =
|
629
|
-
if(
|
630
|
-
|
613
|
+
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
614
|
+
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
615
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
616
|
+
buffer += "</td>\n<td>";
|
617
|
+
if (stack1 = helpers.paramType) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
618
|
+
else { stack1 = depth0.paramType; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
631
619
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
632
|
-
buffer += "</td>\n<td>\n <span class=\"model-signature\"></span>\n</td>\n
|
633
|
-
return buffer;
|
620
|
+
buffer += "</td>\n<td>\n <span class=\"model-signature\"></span>\n</td>\n";
|
621
|
+
return buffer;
|
622
|
+
});
|
634
623
|
})();
|
635
624
|
|
636
625
|
(function() {
|
637
626
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
638
627
|
templates['param_list'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
639
|
-
|
640
|
-
|
628
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
629
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
630
|
+
var buffer = "", stack1, stack2, options, self=this, helperMissing=helpers.helperMissing, functionType="function", escapeExpression=this.escapeExpression;
|
641
631
|
|
642
632
|
function program1(depth0,data) {
|
643
633
|
|
644
634
|
|
645
|
-
return "
|
635
|
+
return " multiple='multiple'";
|
636
|
+
}
|
646
637
|
|
647
638
|
function program3(depth0,data) {
|
648
639
|
|
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
640
|
|
664
|
-
|
665
|
-
|
641
|
+
return "\n ";
|
642
|
+
}
|
666
643
|
|
644
|
+
function program5(depth0,data) {
|
645
|
+
|
646
|
+
var buffer = "", stack1;
|
647
|
+
buffer += "\n ";
|
648
|
+
stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(8, program8, data),fn:self.program(6, program6, data),data:data});
|
649
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
650
|
+
buffer += "\n ";
|
651
|
+
return buffer;
|
652
|
+
}
|
667
653
|
function program6(depth0,data) {
|
668
654
|
|
669
655
|
|
670
|
-
return "\n
|
656
|
+
return "\n ";
|
657
|
+
}
|
671
658
|
|
672
659
|
function program8(depth0,data) {
|
673
660
|
|
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; }
|
661
|
+
var buffer = "", stack1, stack2, options;
|
685
662
|
buffer += "\n ";
|
686
|
-
|
663
|
+
options = {hash:{},inverse:self.program(11, program11, data),fn:self.program(9, program9, data),data:data};
|
664
|
+
stack2 = ((stack1 = helpers.isArray || depth0.isArray),stack1 ? stack1.call(depth0, depth0, options) : helperMissing.call(depth0, "isArray", depth0, options));
|
665
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
666
|
+
buffer += "\n ";
|
667
|
+
return buffer;
|
668
|
+
}
|
687
669
|
function program9(depth0,data) {
|
688
670
|
|
689
|
-
|
690
|
-
|
691
|
-
|
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;}
|
671
|
+
|
672
|
+
return "\n ";
|
673
|
+
}
|
702
674
|
|
703
675
|
function program11(depth0,data) {
|
704
676
|
|
677
|
+
|
678
|
+
return "\n <option selected=\"\" value=''></option>\n ";
|
679
|
+
}
|
680
|
+
|
681
|
+
function program13(depth0,data) {
|
682
|
+
|
683
|
+
var buffer = "", stack1;
|
684
|
+
buffer += "\n ";
|
685
|
+
stack1 = helpers['if'].call(depth0, depth0.isDefault, {hash:{},inverse:self.program(16, program16, data),fn:self.program(14, program14, data),data:data});
|
686
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
687
|
+
buffer += "\n ";
|
688
|
+
return buffer;
|
689
|
+
}
|
690
|
+
function program14(depth0,data) {
|
691
|
+
|
692
|
+
var buffer = "", stack1;
|
693
|
+
buffer += "\n <option selected=\"\" value='";
|
694
|
+
if (stack1 = helpers.value) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
695
|
+
else { stack1 = depth0.value; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
696
|
+
buffer += escapeExpression(stack1)
|
697
|
+
+ "'>";
|
698
|
+
if (stack1 = helpers.value) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
699
|
+
else { stack1 = depth0.value; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
700
|
+
buffer += escapeExpression(stack1)
|
701
|
+
+ " (default)</option>\n ";
|
702
|
+
return buffer;
|
703
|
+
}
|
704
|
+
|
705
|
+
function program16(depth0,data) {
|
706
|
+
|
705
707
|
var buffer = "", stack1;
|
706
|
-
buffer += "\n
|
707
|
-
|
708
|
-
stack1 =
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
return buffer;}
|
708
|
+
buffer += "\n <option value='";
|
709
|
+
if (stack1 = helpers.value) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
710
|
+
else { stack1 = depth0.value; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
711
|
+
buffer += escapeExpression(stack1)
|
712
|
+
+ "'>";
|
713
|
+
if (stack1 = helpers.value) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
714
|
+
else { stack1 = depth0.value; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
715
|
+
buffer += escapeExpression(stack1)
|
716
|
+
+ "</option>\n ";
|
717
|
+
return buffer;
|
718
|
+
}
|
718
719
|
|
719
720
|
buffer += "<td class='code'>";
|
720
|
-
|
721
|
-
stack1 =
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
stack2 = helpers['if'];
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
if(
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
stack2 =
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
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;});
|
721
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
722
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
723
|
+
buffer += escapeExpression(stack1)
|
724
|
+
+ "</td>\n<td>\n <select ";
|
725
|
+
options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data};
|
726
|
+
stack2 = ((stack1 = helpers.isArray || depth0.isArray),stack1 ? stack1.call(depth0, depth0, options) : helperMissing.call(depth0, "isArray", depth0, options));
|
727
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
728
|
+
buffer += " class='parameter' name='";
|
729
|
+
if (stack2 = helpers.name) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
|
730
|
+
else { stack2 = depth0.name; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
|
731
|
+
buffer += escapeExpression(stack2)
|
732
|
+
+ "'>\n ";
|
733
|
+
stack2 = helpers['if'].call(depth0, depth0.required, {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data});
|
734
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
735
|
+
buffer += "\n ";
|
736
|
+
stack2 = helpers.each.call(depth0, ((stack1 = depth0.allowableValues),stack1 == null || stack1 === false ? stack1 : stack1.descriptiveValues), {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data});
|
737
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
738
|
+
buffer += "\n </select>\n</td>\n<td>";
|
739
|
+
if (stack2 = helpers.description) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
|
740
|
+
else { stack2 = depth0.description; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
|
741
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
742
|
+
buffer += "</td>\n<td>";
|
743
|
+
if (stack2 = helpers.paramType) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
|
744
|
+
else { stack2 = depth0.paramType; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
|
745
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
746
|
+
buffer += "</td>\n<td><span class=\"model-signature\"></span></td>";
|
747
|
+
return buffer;
|
748
|
+
});
|
758
749
|
})();
|
759
750
|
|
760
751
|
(function() {
|
761
752
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
762
753
|
templates['param_readonly'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
763
|
-
|
764
|
-
|
754
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
755
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
756
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
765
757
|
|
766
758
|
function program1(depth0,data) {
|
767
759
|
|
768
760
|
var buffer = "", stack1;
|
769
761
|
buffer += "\n <textarea class='body-textarea' readonly='readonly' name='";
|
770
|
-
|
771
|
-
stack1 =
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
return buffer;}
|
762
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
763
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
764
|
+
buffer += escapeExpression(stack1)
|
765
|
+
+ "'>";
|
766
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
767
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
768
|
+
buffer += escapeExpression(stack1)
|
769
|
+
+ "</textarea>\n ";
|
770
|
+
return buffer;
|
771
|
+
}
|
781
772
|
|
782
773
|
function program3(depth0,data) {
|
783
774
|
|
784
775
|
var buffer = "", stack1;
|
785
776
|
buffer += "\n ";
|
786
|
-
|
787
|
-
stack1
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
777
|
+
stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(6, program6, data),fn:self.program(4, program4, data),data:data});
|
778
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
779
|
+
buffer += "\n ";
|
780
|
+
return buffer;
|
781
|
+
}
|
782
|
+
function program4(depth0,data) {
|
783
|
+
|
784
|
+
var buffer = "", stack1;
|
785
|
+
buffer += "\n ";
|
786
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
787
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
788
|
+
buffer += escapeExpression(stack1)
|
789
|
+
+ "\n ";
|
790
|
+
return buffer;
|
791
|
+
}
|
792
|
+
|
793
|
+
function program6(depth0,data) {
|
794
|
+
|
795
|
+
|
796
|
+
return "\n (empty)\n ";
|
797
|
+
}
|
792
798
|
|
793
799
|
buffer += "<td class='code'>";
|
794
|
-
|
795
|
-
stack1 =
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
foundHelper = helpers.isBody;
|
800
|
-
stack1 = foundHelper || depth0.isBody;
|
801
|
-
stack2 = helpers['if'];
|
802
|
-
tmp1 = self.program(1, program1, data);
|
803
|
-
tmp1.hash = {};
|
804
|
-
tmp1.fn = tmp1;
|
805
|
-
tmp1.inverse = self.program(3, program3, data);
|
806
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
800
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
801
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
802
|
+
buffer += escapeExpression(stack1)
|
803
|
+
+ "</td>\n<td>\n ";
|
804
|
+
stack1 = helpers['if'].call(depth0, depth0.isBody, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data),data:data});
|
807
805
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
808
806
|
buffer += "\n</td>\n<td>";
|
809
|
-
|
810
|
-
stack1 =
|
811
|
-
if(
|
812
|
-
|
807
|
+
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
808
|
+
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
809
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
810
|
+
buffer += "</td>\n<td>";
|
811
|
+
if (stack1 = helpers.paramType) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
812
|
+
else { stack1 = depth0.paramType; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
813
813
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
814
814
|
buffer += "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
815
|
-
return buffer;
|
815
|
+
return buffer;
|
816
|
+
});
|
816
817
|
})();
|
817
818
|
|
818
819
|
(function() {
|
819
820
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
820
821
|
templates['param_readonly_required'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
821
|
-
|
822
|
-
|
822
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
823
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
824
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
823
825
|
|
824
826
|
function program1(depth0,data) {
|
825
827
|
|
826
828
|
var buffer = "", stack1;
|
827
829
|
buffer += "\n <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='";
|
828
|
-
|
829
|
-
stack1 =
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
return buffer;}
|
830
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
831
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
832
|
+
buffer += escapeExpression(stack1)
|
833
|
+
+ "'>";
|
834
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
835
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
836
|
+
buffer += escapeExpression(stack1)
|
837
|
+
+ "</textarea>\n ";
|
838
|
+
return buffer;
|
839
|
+
}
|
839
840
|
|
840
841
|
function program3(depth0,data) {
|
841
842
|
|
842
843
|
var buffer = "", stack1;
|
843
844
|
buffer += "\n ";
|
844
|
-
|
845
|
-
stack1
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
845
|
+
stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(6, program6, data),fn:self.program(4, program4, data),data:data});
|
846
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
847
|
+
buffer += "\n ";
|
848
|
+
return buffer;
|
849
|
+
}
|
850
|
+
function program4(depth0,data) {
|
851
|
+
|
852
|
+
var buffer = "", stack1;
|
853
|
+
buffer += "\n ";
|
854
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
855
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
856
|
+
buffer += escapeExpression(stack1)
|
857
|
+
+ "\n ";
|
858
|
+
return buffer;
|
859
|
+
}
|
860
|
+
|
861
|
+
function program6(depth0,data) {
|
862
|
+
|
863
|
+
|
864
|
+
return "\n (empty)\n ";
|
865
|
+
}
|
850
866
|
|
851
867
|
buffer += "<td class='code required'>";
|
852
|
-
|
853
|
-
stack1 =
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
foundHelper = helpers.isBody;
|
858
|
-
stack1 = foundHelper || depth0.isBody;
|
859
|
-
stack2 = helpers['if'];
|
860
|
-
tmp1 = self.program(1, program1, data);
|
861
|
-
tmp1.hash = {};
|
862
|
-
tmp1.fn = tmp1;
|
863
|
-
tmp1.inverse = self.program(3, program3, data);
|
864
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
868
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
869
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
870
|
+
buffer += escapeExpression(stack1)
|
871
|
+
+ "</td>\n<td>\n ";
|
872
|
+
stack1 = helpers['if'].call(depth0, depth0.isBody, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data),data:data});
|
865
873
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
866
874
|
buffer += "\n</td>\n<td>";
|
867
|
-
|
868
|
-
stack1 =
|
869
|
-
if(
|
870
|
-
|
875
|
+
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
876
|
+
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
877
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
878
|
+
buffer += "</td>\n<td>";
|
879
|
+
if (stack1 = helpers.paramType) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
880
|
+
else { stack1 = depth0.paramType; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
871
881
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
872
882
|
buffer += "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
873
|
-
return buffer;
|
883
|
+
return buffer;
|
884
|
+
});
|
874
885
|
})();
|
875
886
|
|
876
887
|
(function() {
|
877
888
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
878
889
|
templates['param_required'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
879
|
-
|
880
|
-
|
890
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
891
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
892
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
881
893
|
|
882
894
|
function program1(depth0,data) {
|
883
895
|
|
884
|
-
var buffer = "", stack1
|
896
|
+
var buffer = "", stack1;
|
885
897
|
buffer += "\n ";
|
886
|
-
|
887
|
-
stack1 = foundHelper || depth0.isFile;
|
888
|
-
stack2 = helpers['if'];
|
889
|
-
tmp1 = self.program(2, program2, data);
|
890
|
-
tmp1.hash = {};
|
891
|
-
tmp1.fn = tmp1;
|
892
|
-
tmp1.inverse = self.program(4, program4, data);
|
893
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
898
|
+
stack1 = helpers['if'].call(depth0, depth0.isFile, {hash:{},inverse:self.program(4, program4, data),fn:self.program(2, program2, data),data:data});
|
894
899
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
895
900
|
buffer += "\n ";
|
896
|
-
return buffer;
|
901
|
+
return buffer;
|
902
|
+
}
|
897
903
|
function program2(depth0,data) {
|
898
904
|
|
899
905
|
var buffer = "", stack1;
|
900
906
|
buffer += "\n <input type=\"file\" name='";
|
901
|
-
|
902
|
-
stack1 =
|
903
|
-
|
904
|
-
|
905
|
-
buffer
|
906
|
-
|
907
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
908
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
909
|
+
buffer += escapeExpression(stack1)
|
910
|
+
+ "'/>\n ";
|
911
|
+
return buffer;
|
912
|
+
}
|
907
913
|
|
908
914
|
function program4(depth0,data) {
|
909
915
|
|
910
|
-
var buffer = "", stack1
|
916
|
+
var buffer = "", stack1;
|
911
917
|
buffer += "\n ";
|
912
|
-
|
913
|
-
stack1 = foundHelper || depth0.defaultValue;
|
914
|
-
stack2 = helpers['if'];
|
915
|
-
tmp1 = self.program(5, program5, data);
|
916
|
-
tmp1.hash = {};
|
917
|
-
tmp1.fn = tmp1;
|
918
|
-
tmp1.inverse = self.program(7, program7, data);
|
919
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
918
|
+
stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data});
|
920
919
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
921
920
|
buffer += "\n ";
|
922
|
-
return buffer;
|
921
|
+
return buffer;
|
922
|
+
}
|
923
923
|
function program5(depth0,data) {
|
924
924
|
|
925
925
|
var buffer = "", stack1;
|
926
926
|
buffer += "\n <textarea class='body-textarea' placeholder='(required)' name='";
|
927
|
-
|
928
|
-
stack1 =
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
return buffer;}
|
927
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
928
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
929
|
+
buffer += escapeExpression(stack1)
|
930
|
+
+ "'>";
|
931
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
932
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
933
|
+
buffer += escapeExpression(stack1)
|
934
|
+
+ "</textarea>\n ";
|
935
|
+
return buffer;
|
936
|
+
}
|
938
937
|
|
939
938
|
function program7(depth0,data) {
|
940
939
|
|
941
940
|
var buffer = "", stack1;
|
942
941
|
buffer += "\n <textarea class='body-textarea' placeholder='(required)' name='";
|
943
|
-
|
944
|
-
stack1 =
|
945
|
-
|
946
|
-
|
947
|
-
buffer
|
948
|
-
|
942
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
943
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
944
|
+
buffer += escapeExpression(stack1)
|
945
|
+
+ "'></textarea>\n <br />\n <div class=\"parameter-content-type\" />\n ";
|
946
|
+
return buffer;
|
947
|
+
}
|
949
948
|
|
950
949
|
function program9(depth0,data) {
|
951
950
|
|
952
|
-
var buffer = "", stack1
|
951
|
+
var buffer = "", stack1;
|
953
952
|
buffer += "\n ";
|
954
|
-
|
955
|
-
stack1 = foundHelper || depth0.isFile;
|
956
|
-
stack2 = helpers['if'];
|
957
|
-
tmp1 = self.program(10, program10, data);
|
958
|
-
tmp1.hash = {};
|
959
|
-
tmp1.fn = tmp1;
|
960
|
-
tmp1.inverse = self.program(12, program12, data);
|
961
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
953
|
+
stack1 = helpers['if'].call(depth0, depth0.isFile, {hash:{},inverse:self.program(12, program12, data),fn:self.program(10, program10, data),data:data});
|
962
954
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
963
955
|
buffer += "\n ";
|
964
|
-
return buffer;
|
956
|
+
return buffer;
|
957
|
+
}
|
965
958
|
function program10(depth0,data) {
|
966
959
|
|
967
960
|
var buffer = "", stack1;
|
968
|
-
buffer += "\n <input class='required' type='file' name='";
|
969
|
-
|
970
|
-
stack1 =
|
971
|
-
|
972
|
-
|
973
|
-
buffer
|
974
|
-
|
961
|
+
buffer += "\n <input class='parameter' class='required' type='file' name='";
|
962
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
963
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
964
|
+
buffer += escapeExpression(stack1)
|
965
|
+
+ "'/>\n ";
|
966
|
+
return buffer;
|
967
|
+
}
|
975
968
|
|
976
969
|
function program12(depth0,data) {
|
977
970
|
|
978
|
-
var buffer = "", stack1
|
971
|
+
var buffer = "", stack1;
|
979
972
|
buffer += "\n ";
|
980
|
-
|
981
|
-
stack1 = foundHelper || depth0.defaultValue;
|
982
|
-
stack2 = helpers['if'];
|
983
|
-
tmp1 = self.program(13, program13, data);
|
984
|
-
tmp1.hash = {};
|
985
|
-
tmp1.fn = tmp1;
|
986
|
-
tmp1.inverse = self.program(15, program15, data);
|
987
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
973
|
+
stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(15, program15, data),fn:self.program(13, program13, data),data:data});
|
988
974
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
989
975
|
buffer += "\n ";
|
990
|
-
return buffer;
|
976
|
+
return buffer;
|
977
|
+
}
|
991
978
|
function program13(depth0,data) {
|
992
979
|
|
993
980
|
var buffer = "", stack1;
|
994
|
-
buffer += "\n <input class='required' minlength='1' name='";
|
995
|
-
|
996
|
-
stack1 =
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
return buffer;}
|
981
|
+
buffer += "\n <input class='parameter required' minlength='1' name='";
|
982
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
983
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
984
|
+
buffer += escapeExpression(stack1)
|
985
|
+
+ "' placeholder='(required)' type='text' value='";
|
986
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
987
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
988
|
+
buffer += escapeExpression(stack1)
|
989
|
+
+ "'/>\n ";
|
990
|
+
return buffer;
|
991
|
+
}
|
1006
992
|
|
1007
993
|
function program15(depth0,data) {
|
1008
994
|
|
1009
995
|
var buffer = "", stack1;
|
1010
|
-
buffer += "\n <input class='required' minlength='1' name='";
|
1011
|
-
|
1012
|
-
stack1 =
|
1013
|
-
|
1014
|
-
|
1015
|
-
buffer
|
1016
|
-
|
996
|
+
buffer += "\n <input class='parameter required' minlength='1' name='";
|
997
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
998
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
999
|
+
buffer += escapeExpression(stack1)
|
1000
|
+
+ "' placeholder='(required)' type='text' value=''/>\n ";
|
1001
|
+
return buffer;
|
1002
|
+
}
|
1017
1003
|
|
1018
1004
|
buffer += "<td class='code required'>";
|
1019
|
-
|
1020
|
-
stack1 =
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
foundHelper = helpers.isBody;
|
1025
|
-
stack1 = foundHelper || depth0.isBody;
|
1026
|
-
stack2 = helpers['if'];
|
1027
|
-
tmp1 = self.program(1, program1, data);
|
1028
|
-
tmp1.hash = {};
|
1029
|
-
tmp1.fn = tmp1;
|
1030
|
-
tmp1.inverse = self.program(9, program9, data);
|
1031
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
1005
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1006
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1007
|
+
buffer += escapeExpression(stack1)
|
1008
|
+
+ "</td>\n<td>\n ";
|
1009
|
+
stack1 = helpers['if'].call(depth0, depth0.isBody, {hash:{},inverse:self.program(9, program9, data),fn:self.program(1, program1, data),data:data});
|
1032
1010
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1033
1011
|
buffer += "\n</td>\n<td>\n <strong>";
|
1034
|
-
|
1035
|
-
stack1 =
|
1036
|
-
if(
|
1037
|
-
|
1012
|
+
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1013
|
+
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1014
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1015
|
+
buffer += "</strong>\n</td>\n<td>";
|
1016
|
+
if (stack1 = helpers.paramType) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1017
|
+
else { stack1 = depth0.paramType; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1018
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1019
|
+
buffer += "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
1020
|
+
return buffer;
|
1021
|
+
});
|
1022
|
+
})();
|
1023
|
+
|
1024
|
+
(function() {
|
1025
|
+
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
1026
|
+
templates['parameter_content_type'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
1027
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
1028
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
1029
|
+
var buffer = "", stack1, functionType="function", self=this;
|
1030
|
+
|
1031
|
+
function program1(depth0,data) {
|
1032
|
+
|
1033
|
+
var buffer = "", stack1;
|
1034
|
+
buffer += "\n ";
|
1035
|
+
stack1 = helpers.each.call(depth0, depth0.consumes, {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data});
|
1036
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1037
|
+
buffer += "\n";
|
1038
|
+
return buffer;
|
1039
|
+
}
|
1040
|
+
function program2(depth0,data) {
|
1041
|
+
|
1042
|
+
var buffer = "", stack1;
|
1043
|
+
buffer += "\n <option value=\"";
|
1044
|
+
stack1 = (typeof depth0 === functionType ? depth0.apply(depth0) : depth0);
|
1045
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1046
|
+
buffer += "\">";
|
1047
|
+
stack1 = (typeof depth0 === functionType ? depth0.apply(depth0) : depth0);
|
1038
1048
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1039
|
-
buffer += "</
|
1040
|
-
return buffer;
|
1049
|
+
buffer += "</option>\n ";
|
1050
|
+
return buffer;
|
1051
|
+
}
|
1052
|
+
|
1053
|
+
function program4(depth0,data) {
|
1054
|
+
|
1055
|
+
|
1056
|
+
return "\n <option value=\"application/json\">application/json</option>\n";
|
1057
|
+
}
|
1058
|
+
|
1059
|
+
buffer += "<label for=\"parameterContentType\"></label>\n<select name=\"parameterContentType\">\n";
|
1060
|
+
stack1 = helpers['if'].call(depth0, depth0.consumes, {hash:{},inverse:self.program(4, program4, data),fn:self.program(1, program1, data),data:data});
|
1061
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1062
|
+
buffer += "\n</select>\n";
|
1063
|
+
return buffer;
|
1064
|
+
});
|
1041
1065
|
})();
|
1042
1066
|
|
1043
1067
|
(function() {
|
1044
1068
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
1045
1069
|
templates['resource'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
stack1 =
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
stack1 =
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
stack1 =
|
1073
|
-
if(
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
if(
|
1079
|
-
else
|
1080
|
-
buffer += escapeExpression(stack1)
|
1081
|
-
|
1082
|
-
stack1 =
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
stack1 =
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
if(
|
1099
|
-
else
|
1100
|
-
buffer += escapeExpression(stack1)
|
1101
|
-
|
1070
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
1071
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
1072
|
+
var buffer = "", stack1, options, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
|
1073
|
+
|
1074
|
+
function program1(depth0,data) {
|
1075
|
+
|
1076
|
+
|
1077
|
+
return " : ";
|
1078
|
+
}
|
1079
|
+
|
1080
|
+
buffer += "<div class='heading'>\n <h2>\n <a href='#!/";
|
1081
|
+
if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1082
|
+
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1083
|
+
buffer += escapeExpression(stack1)
|
1084
|
+
+ "' class=\"toggleEndpointList\" data-id=\"";
|
1085
|
+
if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1086
|
+
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1087
|
+
buffer += escapeExpression(stack1)
|
1088
|
+
+ "\">";
|
1089
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1090
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1091
|
+
buffer += escapeExpression(stack1)
|
1092
|
+
+ "</a> ";
|
1093
|
+
options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data};
|
1094
|
+
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, options); }
|
1095
|
+
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1096
|
+
if (!helpers.description) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
|
1097
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1098
|
+
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1099
|
+
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1100
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1101
|
+
buffer += "\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/";
|
1102
|
+
if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1103
|
+
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1104
|
+
buffer += escapeExpression(stack1)
|
1105
|
+
+ "' id='endpointListTogger_";
|
1106
|
+
if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1107
|
+
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1108
|
+
buffer += escapeExpression(stack1)
|
1109
|
+
+ "' class=\"toggleEndpointList\" data-id=\"";
|
1110
|
+
if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1111
|
+
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1112
|
+
buffer += escapeExpression(stack1)
|
1113
|
+
+ "\">Show/Hide</a>\n </li>\n <li>\n <a href='#' class=\"collapseResource\" data-id=\"";
|
1114
|
+
if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1115
|
+
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1116
|
+
buffer += escapeExpression(stack1)
|
1117
|
+
+ "\">\n List Operations\n </a>\n </li>\n <li>\n <a href='#' class=\"expandResource\" data-id=";
|
1118
|
+
if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1119
|
+
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1120
|
+
buffer += escapeExpression(stack1)
|
1121
|
+
+ ">\n Expand Operations\n </a>\n </li>\n <li>\n <a href='";
|
1122
|
+
if (stack1 = helpers.url) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1123
|
+
else { stack1 = depth0.url; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1124
|
+
buffer += escapeExpression(stack1)
|
1125
|
+
+ "'>Raw</a>\n </li>\n </ul>\n</div>\n<ul class='endpoints' id='";
|
1126
|
+
if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1127
|
+
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1128
|
+
buffer += escapeExpression(stack1)
|
1129
|
+
+ "_endpoint_list' style='display:none'>\n\n</ul>\n";
|
1130
|
+
return buffer;
|
1131
|
+
});
|
1132
|
+
})();
|
1133
|
+
|
1134
|
+
(function() {
|
1135
|
+
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
1136
|
+
templates['response_content_type'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
1137
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
1138
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
1139
|
+
var buffer = "", stack1, functionType="function", self=this;
|
1140
|
+
|
1141
|
+
function program1(depth0,data) {
|
1142
|
+
|
1143
|
+
var buffer = "", stack1;
|
1144
|
+
buffer += "\n ";
|
1145
|
+
stack1 = helpers.each.call(depth0, depth0.produces, {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data});
|
1146
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1147
|
+
buffer += "\n";
|
1148
|
+
return buffer;
|
1149
|
+
}
|
1150
|
+
function program2(depth0,data) {
|
1151
|
+
|
1152
|
+
var buffer = "", stack1;
|
1153
|
+
buffer += "\n <option value=\"";
|
1154
|
+
stack1 = (typeof depth0 === functionType ? depth0.apply(depth0) : depth0);
|
1155
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1156
|
+
buffer += "\">";
|
1157
|
+
stack1 = (typeof depth0 === functionType ? depth0.apply(depth0) : depth0);
|
1158
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1159
|
+
buffer += "</option>\n ";
|
1160
|
+
return buffer;
|
1161
|
+
}
|
1162
|
+
|
1163
|
+
function program4(depth0,data) {
|
1164
|
+
|
1165
|
+
|
1166
|
+
return "\n <option value=\"application/json\">application/json</option>\n";
|
1167
|
+
}
|
1168
|
+
|
1169
|
+
buffer += "<label for=\"responseContentType\"></label>\n<select name=\"responseContentType\">\n";
|
1170
|
+
stack1 = helpers['if'].call(depth0, depth0.produces, {hash:{},inverse:self.program(4, program4, data),fn:self.program(1, program1, data),data:data});
|
1171
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1172
|
+
buffer += "\n</select>\n";
|
1173
|
+
return buffer;
|
1174
|
+
});
|
1102
1175
|
})();
|
1103
1176
|
|
1104
1177
|
(function() {
|
1105
1178
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
1106
1179
|
templates['signature'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
1107
|
-
|
1108
|
-
|
1180
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
1181
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
1182
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression;
|
1109
1183
|
|
1110
1184
|
|
1111
1185
|
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 ";
|
1112
|
-
|
1113
|
-
stack1 =
|
1114
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
1115
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "signature", { hash: {} }); }
|
1186
|
+
if (stack1 = helpers.signature) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1187
|
+
else { stack1 = depth0.signature; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1116
1188
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1117
1189
|
buffer += "\n </div>\n\n <div class=\"snippet\">\n <pre><code>";
|
1118
|
-
|
1119
|
-
stack1 =
|
1120
|
-
|
1121
|
-
|
1122
|
-
buffer
|
1123
|
-
|
1190
|
+
if (stack1 = helpers.sampleJSON) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1191
|
+
else { stack1 = depth0.sampleJSON; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1192
|
+
buffer += escapeExpression(stack1)
|
1193
|
+
+ "</code></pre>\n <small class=\"notice\"></small>\n </div>\n</div>\n\n";
|
1194
|
+
return buffer;
|
1195
|
+
});
|
1124
1196
|
})();
|
1125
1197
|
|
1126
1198
|
(function() {
|
1127
1199
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
1128
1200
|
templates['status_code'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
1129
|
-
|
1130
|
-
|
1201
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
1202
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
1203
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression;
|
1131
1204
|
|
1132
1205
|
|
1133
1206
|
buffer += "<td width='15%' class='code'>";
|
1134
|
-
|
1135
|
-
stack1 =
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
stack1 = foundHelper || depth0.reason;
|
1141
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
1142
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "reason", { hash: {} }); }
|
1207
|
+
if (stack1 = helpers.code) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1208
|
+
else { stack1 = depth0.code; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1209
|
+
buffer += escapeExpression(stack1)
|
1210
|
+
+ "</td>\n<td>";
|
1211
|
+
if (stack1 = helpers.message) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1212
|
+
else { stack1 = depth0.message; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1143
1213
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1144
|
-
buffer += "</td>\n\
|
1145
|
-
return buffer;
|
1214
|
+
buffer += "</td>\n<td width='50%'><span class=\"model-signature\" /></td>";
|
1215
|
+
return buffer;
|
1216
|
+
});
|
1146
1217
|
})();
|
1147
1218
|
|
1148
1219
|
|
1149
1220
|
|
1150
|
-
// Generated by CoffeeScript 1.
|
1221
|
+
// Generated by CoffeeScript 1.6.3
|
1151
1222
|
(function() {
|
1152
|
-
var ContentTypeView, HeaderView, MainView, OperationView, ParameterView, ResourceView, SignatureView, StatusCodeView, SwaggerUi,
|
1223
|
+
var ContentTypeView, HeaderView, MainView, OperationView, ParameterContentTypeView, ParameterView, ResourceView, ResponseContentTypeView, SignatureView, StatusCodeView, SwaggerUi, _ref, _ref1, _ref10, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9,
|
1153
1224
|
__hasProp = {}.hasOwnProperty,
|
1154
1225
|
__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; };
|
1155
1226
|
|
1156
1227
|
SwaggerUi = (function(_super) {
|
1157
|
-
|
1158
1228
|
__extends(SwaggerUi, _super);
|
1159
1229
|
|
1160
1230
|
function SwaggerUi() {
|
1161
|
-
|
1231
|
+
_ref = SwaggerUi.__super__.constructor.apply(this, arguments);
|
1232
|
+
return _ref;
|
1162
1233
|
}
|
1163
1234
|
|
1164
1235
|
SwaggerUi.prototype.dom_id = "swagger_ui";
|
@@ -1180,7 +1251,7 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1180
1251
|
this.dom_id = options.dom_id;
|
1181
1252
|
delete options.dom_id;
|
1182
1253
|
}
|
1183
|
-
if (
|
1254
|
+
if ($('#' + this.dom_id) == null) {
|
1184
1255
|
$('body').append('<div id="' + this.dom_id + '"></div>');
|
1185
1256
|
}
|
1186
1257
|
this.options = options;
|
@@ -1202,18 +1273,24 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1202
1273
|
};
|
1203
1274
|
|
1204
1275
|
SwaggerUi.prototype.updateSwaggerUi = function(data) {
|
1205
|
-
this.options.
|
1206
|
-
this.options.apiKey = data.apiKey;
|
1276
|
+
this.options.url = data.url;
|
1207
1277
|
return this.load();
|
1208
1278
|
};
|
1209
1279
|
|
1210
1280
|
SwaggerUi.prototype.load = function() {
|
1211
|
-
var
|
1212
|
-
if ((
|
1213
|
-
|
1281
|
+
var url, _ref1;
|
1282
|
+
if ((_ref1 = this.mainView) != null) {
|
1283
|
+
_ref1.clear();
|
1214
1284
|
}
|
1215
|
-
|
1216
|
-
|
1285
|
+
url = this.options.url;
|
1286
|
+
if (url.indexOf("http") !== 0) {
|
1287
|
+
url = this.buildUrl(window.location.href.toString(), url);
|
1288
|
+
}
|
1289
|
+
this.options.url = url;
|
1290
|
+
this.headerView.update(url);
|
1291
|
+
this.api = new SwaggerApi(this.options);
|
1292
|
+
this.api.build();
|
1293
|
+
return this.api;
|
1217
1294
|
};
|
1218
1295
|
|
1219
1296
|
SwaggerUi.prototype.render = function() {
|
@@ -1221,7 +1298,8 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1221
1298
|
this.showMessage('Finished Loading Resource Information. Rendering Swagger UI...');
|
1222
1299
|
this.mainView = new MainView({
|
1223
1300
|
model: this.api,
|
1224
|
-
el: $('#' + this.dom_id)
|
1301
|
+
el: $('#' + this.dom_id),
|
1302
|
+
swaggerOptions: this.options
|
1225
1303
|
}).render();
|
1226
1304
|
this.showMessage();
|
1227
1305
|
switch (this.options.docExpansion) {
|
@@ -1239,6 +1317,29 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1239
1317
|
}, 400);
|
1240
1318
|
};
|
1241
1319
|
|
1320
|
+
SwaggerUi.prototype.buildUrl = function(base, url) {
|
1321
|
+
var endOfPath, parts;
|
1322
|
+
log("base is " + base);
|
1323
|
+
if (url.indexOf("/") === 0) {
|
1324
|
+
parts = base.split("/");
|
1325
|
+
base = parts[0] + "//" + parts[2];
|
1326
|
+
return base + url;
|
1327
|
+
} else {
|
1328
|
+
endOfPath = base.length;
|
1329
|
+
if (base.indexOf("?") > -1) {
|
1330
|
+
endOfPath = Math.min(endOfPath, base.indexOf("?"));
|
1331
|
+
}
|
1332
|
+
if (base.indexOf("#") > -1) {
|
1333
|
+
endOfPath = Math.min(endOfPath, base.indexOf("#"));
|
1334
|
+
}
|
1335
|
+
base = base.substring(0, endOfPath);
|
1336
|
+
if (base.indexOf("/", base.length - 1) !== -1) {
|
1337
|
+
return base + url;
|
1338
|
+
}
|
1339
|
+
return base + "/" + url;
|
1340
|
+
}
|
1341
|
+
};
|
1342
|
+
|
1242
1343
|
SwaggerUi.prototype.showMessage = function(data) {
|
1243
1344
|
if (data == null) {
|
1244
1345
|
data = '';
|
@@ -1269,11 +1370,11 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1269
1370
|
window.SwaggerUi = SwaggerUi;
|
1270
1371
|
|
1271
1372
|
HeaderView = (function(_super) {
|
1272
|
-
|
1273
1373
|
__extends(HeaderView, _super);
|
1274
1374
|
|
1275
1375
|
function HeaderView() {
|
1276
|
-
|
1376
|
+
_ref1 = HeaderView.__super__.constructor.apply(this, arguments);
|
1377
|
+
return _ref1;
|
1277
1378
|
}
|
1278
1379
|
|
1279
1380
|
HeaderView.prototype.events = {
|
@@ -1288,15 +1389,13 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1288
1389
|
|
1289
1390
|
HeaderView.prototype.showPetStore = function(e) {
|
1290
1391
|
return this.trigger('update-swagger-ui', {
|
1291
|
-
|
1292
|
-
apiKey: "special-key"
|
1392
|
+
url: "http://petstore.swagger.wordnik.com/api/api-docs"
|
1293
1393
|
});
|
1294
1394
|
};
|
1295
1395
|
|
1296
1396
|
HeaderView.prototype.showWordnikDev = function(e) {
|
1297
1397
|
return this.trigger('update-swagger-ui', {
|
1298
|
-
|
1299
|
-
apiKey: ""
|
1398
|
+
url: "http://api.wordnik.com/v4/resources.json"
|
1300
1399
|
});
|
1301
1400
|
};
|
1302
1401
|
|
@@ -1311,7 +1410,7 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1311
1410
|
e.preventDefault();
|
1312
1411
|
}
|
1313
1412
|
return this.trigger('update-swagger-ui', {
|
1314
|
-
|
1413
|
+
url: $('#input_baseUrl').val(),
|
1315
1414
|
apiKey: $('#input_apiKey').val()
|
1316
1415
|
});
|
1317
1416
|
};
|
@@ -1321,11 +1420,9 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1321
1420
|
trigger = false;
|
1322
1421
|
}
|
1323
1422
|
$('#input_baseUrl').val(url);
|
1324
|
-
$('#input_apiKey').val(apiKey);
|
1325
1423
|
if (trigger) {
|
1326
1424
|
return this.trigger('update-swagger-ui', {
|
1327
|
-
|
1328
|
-
apiKey: apiKey
|
1425
|
+
url: url
|
1329
1426
|
});
|
1330
1427
|
}
|
1331
1428
|
};
|
@@ -1335,21 +1432,58 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1335
1432
|
})(Backbone.View);
|
1336
1433
|
|
1337
1434
|
MainView = (function(_super) {
|
1435
|
+
var sorters;
|
1338
1436
|
|
1339
1437
|
__extends(MainView, _super);
|
1340
1438
|
|
1341
1439
|
function MainView() {
|
1342
|
-
|
1440
|
+
_ref2 = MainView.__super__.constructor.apply(this, arguments);
|
1441
|
+
return _ref2;
|
1343
1442
|
}
|
1344
1443
|
|
1345
|
-
|
1444
|
+
sorters = {
|
1445
|
+
'alpha': function(a, b) {
|
1446
|
+
return a.path.localeCompare(b.path);
|
1447
|
+
},
|
1448
|
+
'method': function(a, b) {
|
1449
|
+
return a.method.localeCompare(b.method);
|
1450
|
+
}
|
1451
|
+
};
|
1452
|
+
|
1453
|
+
MainView.prototype.initialize = function(opts) {
|
1454
|
+
var route, sorter, sorterName, _i, _len, _ref3;
|
1455
|
+
if (opts == null) {
|
1456
|
+
opts = {};
|
1457
|
+
}
|
1458
|
+
if (opts.swaggerOptions.sorter) {
|
1459
|
+
sorterName = opts.swaggerOptions.sorter;
|
1460
|
+
sorter = sorters[sorterName];
|
1461
|
+
_ref3 = this.model.apisArray;
|
1462
|
+
for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
|
1463
|
+
route = _ref3[_i];
|
1464
|
+
route.operationsArray.sort(sorter);
|
1465
|
+
}
|
1466
|
+
if (sorterName === "alpha") {
|
1467
|
+
return this.model.apisArray.sort(sorter);
|
1468
|
+
}
|
1469
|
+
}
|
1470
|
+
};
|
1346
1471
|
|
1347
1472
|
MainView.prototype.render = function() {
|
1348
|
-
var resource, _i, _len,
|
1473
|
+
var counter, id, resource, resources, _i, _len, _ref3;
|
1349
1474
|
$(this.el).html(Handlebars.templates.main(this.model));
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1475
|
+
resources = {};
|
1476
|
+
counter = 0;
|
1477
|
+
_ref3 = this.model.apisArray;
|
1478
|
+
for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
|
1479
|
+
resource = _ref3[_i];
|
1480
|
+
id = resource.name;
|
1481
|
+
while (typeof resources[id] !== 'undefined') {
|
1482
|
+
id = id + "_" + counter;
|
1483
|
+
counter += 1;
|
1484
|
+
}
|
1485
|
+
resource.id = id;
|
1486
|
+
resources[id] = resource;
|
1353
1487
|
this.addResource(resource);
|
1354
1488
|
}
|
1355
1489
|
return this;
|
@@ -1360,8 +1494,9 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1360
1494
|
resourceView = new ResourceView({
|
1361
1495
|
model: resource,
|
1362
1496
|
tagName: 'li',
|
1363
|
-
id: 'resource_' + resource.
|
1364
|
-
className: 'resource'
|
1497
|
+
id: 'resource_' + resource.id,
|
1498
|
+
className: 'resource',
|
1499
|
+
swaggerOptions: this.options.swaggerOptions
|
1365
1500
|
});
|
1366
1501
|
return $('#resources').append(resourceView.render().el);
|
1367
1502
|
};
|
@@ -1375,24 +1510,36 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1375
1510
|
})(Backbone.View);
|
1376
1511
|
|
1377
1512
|
ResourceView = (function(_super) {
|
1378
|
-
|
1379
1513
|
__extends(ResourceView, _super);
|
1380
1514
|
|
1381
1515
|
function ResourceView() {
|
1382
|
-
|
1516
|
+
_ref3 = ResourceView.__super__.constructor.apply(this, arguments);
|
1517
|
+
return _ref3;
|
1383
1518
|
}
|
1384
1519
|
|
1385
1520
|
ResourceView.prototype.initialize = function() {};
|
1386
1521
|
|
1387
1522
|
ResourceView.prototype.render = function() {
|
1388
|
-
var operation, _i, _len,
|
1523
|
+
var counter, id, methods, operation, _i, _len, _ref4;
|
1389
1524
|
$(this.el).html(Handlebars.templates.resource(this.model));
|
1390
|
-
|
1391
|
-
|
1392
|
-
for (_i = 0, _len =
|
1393
|
-
operation =
|
1525
|
+
methods = {};
|
1526
|
+
_ref4 = this.model.operationsArray;
|
1527
|
+
for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
|
1528
|
+
operation = _ref4[_i];
|
1529
|
+
counter = 0;
|
1530
|
+
id = operation.nickname;
|
1531
|
+
while (typeof methods[id] !== 'undefined') {
|
1532
|
+
id = id + "_" + counter;
|
1533
|
+
counter += 1;
|
1534
|
+
}
|
1535
|
+
methods[id] = operation;
|
1536
|
+
operation.nickname = id;
|
1537
|
+
operation.parentId = this.model.id;
|
1394
1538
|
this.addOperation(operation);
|
1395
1539
|
}
|
1540
|
+
$('.toggleEndpointList', this.el).click(this.callDocs.bind(this, 'toggleEndpointListForResource'));
|
1541
|
+
$('.collapseResource', this.el).click(this.callDocs.bind(this, 'collapseOperationsForResource'));
|
1542
|
+
$('.expandResource', this.el).click(this.callDocs.bind(this, 'expandOperationsForResoruce'));
|
1396
1543
|
return this;
|
1397
1544
|
};
|
1398
1545
|
|
@@ -1402,39 +1549,102 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1402
1549
|
operationView = new OperationView({
|
1403
1550
|
model: operation,
|
1404
1551
|
tagName: 'li',
|
1405
|
-
className: 'endpoint'
|
1552
|
+
className: 'endpoint',
|
1553
|
+
swaggerOptions: this.options.swaggerOptions
|
1406
1554
|
});
|
1407
1555
|
$('.endpoints', $(this.el)).append(operationView.render().el);
|
1408
1556
|
return this.number++;
|
1409
1557
|
};
|
1410
1558
|
|
1559
|
+
ResourceView.prototype.callDocs = function(fnName, e) {
|
1560
|
+
e.preventDefault();
|
1561
|
+
return Docs[fnName](e.currentTarget.getAttribute('data-id'));
|
1562
|
+
};
|
1563
|
+
|
1411
1564
|
return ResourceView;
|
1412
1565
|
|
1413
1566
|
})(Backbone.View);
|
1414
1567
|
|
1415
1568
|
OperationView = (function(_super) {
|
1416
|
-
|
1417
1569
|
__extends(OperationView, _super);
|
1418
1570
|
|
1419
1571
|
function OperationView() {
|
1420
|
-
|
1572
|
+
_ref4 = OperationView.__super__.constructor.apply(this, arguments);
|
1573
|
+
return _ref4;
|
1421
1574
|
}
|
1422
1575
|
|
1576
|
+
OperationView.prototype.invocationUrl = null;
|
1577
|
+
|
1423
1578
|
OperationView.prototype.events = {
|
1424
1579
|
'submit .sandbox': 'submitOperation',
|
1425
1580
|
'click .submit': 'submitOperation',
|
1426
1581
|
'click .response_hider': 'hideResponse',
|
1427
|
-
'click .toggleOperation': 'toggleOperationContent'
|
1582
|
+
'click .toggleOperation': 'toggleOperationContent',
|
1583
|
+
'mouseenter .api-ic': 'mouseEnter',
|
1584
|
+
'mouseout .api-ic': 'mouseExit'
|
1428
1585
|
};
|
1429
1586
|
|
1430
1587
|
OperationView.prototype.initialize = function() {};
|
1431
1588
|
|
1589
|
+
OperationView.prototype.mouseEnter = function(e) {
|
1590
|
+
var elem, hgh, pos, scMaxX, scMaxY, scX, scY, wd, x, y;
|
1591
|
+
elem = $(e.currentTarget.parentNode).find('#api_information_panel');
|
1592
|
+
x = e.pageX;
|
1593
|
+
y = e.pageY;
|
1594
|
+
scX = $(window).scrollLeft();
|
1595
|
+
scY = $(window).scrollTop();
|
1596
|
+
scMaxX = scX + $(window).width();
|
1597
|
+
scMaxY = scY + $(window).height();
|
1598
|
+
wd = elem.width();
|
1599
|
+
hgh = elem.height();
|
1600
|
+
if (x + wd > scMaxX) {
|
1601
|
+
x = scMaxX - wd;
|
1602
|
+
}
|
1603
|
+
if (x < scX) {
|
1604
|
+
x = scX;
|
1605
|
+
}
|
1606
|
+
if (y + hgh > scMaxY) {
|
1607
|
+
y = scMaxY - hgh;
|
1608
|
+
}
|
1609
|
+
if (y < scY) {
|
1610
|
+
y = scY;
|
1611
|
+
}
|
1612
|
+
pos = {};
|
1613
|
+
pos.top = y;
|
1614
|
+
pos.left = x;
|
1615
|
+
elem.css(pos);
|
1616
|
+
return $(e.currentTarget.parentNode).find('#api_information_panel').show();
|
1617
|
+
};
|
1618
|
+
|
1619
|
+
OperationView.prototype.mouseExit = function(e) {
|
1620
|
+
return $(e.currentTarget.parentNode).find('#api_information_panel').hide();
|
1621
|
+
};
|
1622
|
+
|
1432
1623
|
OperationView.prototype.render = function() {
|
1433
|
-
var contentTypeModel,
|
1434
|
-
isMethodSubmissionSupported =
|
1624
|
+
var contentTypeModel, isMethodSubmissionSupported, k, o, param, responseContentTypeView, responseSignatureView, signatureModel, statusCode, type, v, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref5, _ref6, _ref7, _ref8;
|
1625
|
+
isMethodSubmissionSupported = true;
|
1435
1626
|
if (!isMethodSubmissionSupported) {
|
1436
1627
|
this.model.isReadOnly = true;
|
1437
1628
|
}
|
1629
|
+
this.model.oauth = null;
|
1630
|
+
if (this.model.authorizations) {
|
1631
|
+
_ref5 = this.model.authorizations;
|
1632
|
+
for (k in _ref5) {
|
1633
|
+
v = _ref5[k];
|
1634
|
+
if (k === "oauth2") {
|
1635
|
+
if (this.model.oauth === null) {
|
1636
|
+
this.model.oauth = {};
|
1637
|
+
}
|
1638
|
+
if (this.model.oauth.scopes === void 0) {
|
1639
|
+
this.model.oauth.scopes = [];
|
1640
|
+
}
|
1641
|
+
for (_i = 0, _len = v.length; _i < _len; _i++) {
|
1642
|
+
o = v[_i];
|
1643
|
+
this.model.oauth.scopes.push(o);
|
1644
|
+
}
|
1645
|
+
}
|
1646
|
+
}
|
1647
|
+
}
|
1438
1648
|
$(this.el).html(Handlebars.templates.operation(this.model));
|
1439
1649
|
if (this.model.responseClassSignature && this.model.responseClassSignature !== 'string') {
|
1440
1650
|
signatureModel = {
|
@@ -1448,36 +1658,44 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1448
1658
|
});
|
1449
1659
|
$('.model-signature', $(this.el)).append(responseSignatureView.render().el);
|
1450
1660
|
} else {
|
1451
|
-
$('.model-signature', $(this.el)).html(this.model.
|
1661
|
+
$('.model-signature', $(this.el)).html(this.model.type);
|
1452
1662
|
}
|
1453
1663
|
contentTypeModel = {
|
1454
1664
|
isParam: false
|
1455
1665
|
};
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1666
|
+
contentTypeModel.consumes = this.model.consumes;
|
1667
|
+
contentTypeModel.produces = this.model.produces;
|
1668
|
+
_ref6 = this.model.parameters;
|
1669
|
+
for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) {
|
1670
|
+
param = _ref6[_j];
|
1671
|
+
type = param.type || param.dataType;
|
1672
|
+
if (type.toLowerCase() === 'file') {
|
1673
|
+
if (!contentTypeModel.consumes) {
|
1674
|
+
log("set content type ");
|
1675
|
+
contentTypeModel.consumes = 'multipart/form-data';
|
1676
|
+
}
|
1677
|
+
}
|
1461
1678
|
}
|
1462
|
-
|
1679
|
+
responseContentTypeView = new ResponseContentTypeView({
|
1463
1680
|
model: contentTypeModel
|
1464
1681
|
});
|
1465
|
-
$('.content-type', $(this.el)).append(
|
1466
|
-
|
1467
|
-
for (
|
1468
|
-
param =
|
1469
|
-
this.addParameter(param);
|
1682
|
+
$('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);
|
1683
|
+
_ref7 = this.model.parameters;
|
1684
|
+
for (_k = 0, _len2 = _ref7.length; _k < _len2; _k++) {
|
1685
|
+
param = _ref7[_k];
|
1686
|
+
this.addParameter(param, contentTypeModel.consumes);
|
1470
1687
|
}
|
1471
|
-
|
1472
|
-
for (
|
1473
|
-
statusCode =
|
1688
|
+
_ref8 = this.model.responseMessages;
|
1689
|
+
for (_l = 0, _len3 = _ref8.length; _l < _len3; _l++) {
|
1690
|
+
statusCode = _ref8[_l];
|
1474
1691
|
this.addStatusCode(statusCode);
|
1475
1692
|
}
|
1476
1693
|
return this;
|
1477
1694
|
};
|
1478
1695
|
|
1479
|
-
OperationView.prototype.addParameter = function(param) {
|
1696
|
+
OperationView.prototype.addParameter = function(param, consumes) {
|
1480
1697
|
var paramView;
|
1698
|
+
param.consumes = consumes;
|
1481
1699
|
paramView = new ParameterView({
|
1482
1700
|
model: param,
|
1483
1701
|
tagName: 'tr',
|
@@ -1496,8 +1714,7 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1496
1714
|
};
|
1497
1715
|
|
1498
1716
|
OperationView.prototype.submitOperation = function(e) {
|
1499
|
-
var
|
1500
|
-
_this = this;
|
1717
|
+
var error_free, form, isFileUpload, map, o, opts, val, _i, _j, _k, _len, _len1, _len2, _ref5, _ref6, _ref7;
|
1501
1718
|
if (e != null) {
|
1502
1719
|
e.preventDefault();
|
1503
1720
|
}
|
@@ -1518,101 +1735,158 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1518
1735
|
});
|
1519
1736
|
if (error_free) {
|
1520
1737
|
map = {};
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1738
|
+
opts = {
|
1739
|
+
parent: this
|
1740
|
+
};
|
1741
|
+
isFileUpload = false;
|
1742
|
+
_ref5 = form.find("input");
|
1743
|
+
for (_i = 0, _len = _ref5.length; _i < _len; _i++) {
|
1744
|
+
o = _ref5[_i];
|
1524
1745
|
if ((o.value != null) && jQuery.trim(o.value).length > 0) {
|
1525
1746
|
map[o.name] = o.value;
|
1526
1747
|
}
|
1748
|
+
if (o.type === "file") {
|
1749
|
+
isFileUpload = true;
|
1750
|
+
}
|
1527
1751
|
}
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
} else {
|
1534
|
-
_ref1 = this.model.parameters;
|
1535
|
-
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
1536
|
-
o = _ref1[_j];
|
1537
|
-
if (o.paramType === 'form') {
|
1538
|
-
isFormPost = true;
|
1539
|
-
consumes = false;
|
1540
|
-
}
|
1752
|
+
_ref6 = form.find("textarea");
|
1753
|
+
for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) {
|
1754
|
+
o = _ref6[_j];
|
1755
|
+
if ((o.value != null) && jQuery.trim(o.value).length > 0) {
|
1756
|
+
map["body"] = o.value;
|
1541
1757
|
}
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1758
|
+
}
|
1759
|
+
_ref7 = form.find("select");
|
1760
|
+
for (_k = 0, _len2 = _ref7.length; _k < _len2; _k++) {
|
1761
|
+
o = _ref7[_k];
|
1762
|
+
val = this.getSelectedValue(o);
|
1763
|
+
if ((val != null) && jQuery.trim(val).length > 0) {
|
1764
|
+
map[o.name] = val;
|
1546
1765
|
}
|
1547
1766
|
}
|
1767
|
+
opts.responseContentType = $("div select[name=responseContentType]", $(this.el)).val();
|
1768
|
+
opts.requestContentType = $("div select[name=parameterContentType]", $(this.el)).val();
|
1769
|
+
$(".response_throbber", $(this.el)).show();
|
1548
1770
|
if (isFileUpload) {
|
1549
|
-
|
1550
|
-
_ref2 = this.model.parameters;
|
1551
|
-
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
|
1552
|
-
param = _ref2[_k];
|
1553
|
-
if (param.paramType === 'body' && param.name !== 'file') {
|
1554
|
-
bodyParam.append(param.name, map[param.name]);
|
1555
|
-
}
|
1556
|
-
}
|
1557
|
-
$.each(form.children().find('input[type~="file"]'), function(i, el) {
|
1558
|
-
return bodyParam.append($(el).attr('name'), el.files[0]);
|
1559
|
-
});
|
1560
|
-
console.log(bodyParam);
|
1561
|
-
} else if (isFormPost) {
|
1562
|
-
bodyParam = new FormData();
|
1563
|
-
_ref3 = this.model.parameters;
|
1564
|
-
for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {
|
1565
|
-
param = _ref3[_l];
|
1566
|
-
var paramValue = map[param.name];
|
1567
|
-
if (param && paramValue) {
|
1568
|
-
bodyParam.append(param.name, map[param.name]);
|
1569
|
-
}
|
1570
|
-
}
|
1771
|
+
return this.handleFileUpload(map, form);
|
1571
1772
|
} else {
|
1572
|
-
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1773
|
+
return this.model["do"](map, opts, this.showCompleteStatus, this.showErrorStatus, this);
|
1774
|
+
}
|
1775
|
+
}
|
1776
|
+
};
|
1777
|
+
|
1778
|
+
OperationView.prototype.success = function(response, parent) {
|
1779
|
+
return parent.showCompleteStatus(response);
|
1780
|
+
};
|
1781
|
+
|
1782
|
+
OperationView.prototype.handleFileUpload = function(map, form) {
|
1783
|
+
var bodyParam, el, headerParams, o, obj, param, params, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref5, _ref6, _ref7, _ref8,
|
1784
|
+
_this = this;
|
1785
|
+
_ref5 = form.serializeArray();
|
1786
|
+
for (_i = 0, _len = _ref5.length; _i < _len; _i++) {
|
1787
|
+
o = _ref5[_i];
|
1788
|
+
if ((o.value != null) && jQuery.trim(o.value).length > 0) {
|
1789
|
+
map[o.name] = o.value;
|
1790
|
+
}
|
1791
|
+
}
|
1792
|
+
bodyParam = new FormData();
|
1793
|
+
params = 0;
|
1794
|
+
_ref6 = this.model.parameters;
|
1795
|
+
for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) {
|
1796
|
+
param = _ref6[_j];
|
1797
|
+
if (param.paramType === 'form') {
|
1798
|
+
if (param.type.toLowerCase() !== 'file' && map[param.name] !== void 0) {
|
1799
|
+
bodyParam.append(param.name, map[param.name]);
|
1579
1800
|
}
|
1580
1801
|
}
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1802
|
+
}
|
1803
|
+
headerParams = {};
|
1804
|
+
_ref7 = this.model.parameters;
|
1805
|
+
for (_k = 0, _len2 = _ref7.length; _k < _len2; _k++) {
|
1806
|
+
param = _ref7[_k];
|
1807
|
+
if (param.paramType === 'header') {
|
1808
|
+
headerParams[param.name] = map[param.name];
|
1809
|
+
}
|
1810
|
+
}
|
1811
|
+
log(headerParams);
|
1812
|
+
_ref8 = form.find('input[type~="file"]');
|
1813
|
+
for (_l = 0, _len3 = _ref8.length; _l < _len3; _l++) {
|
1814
|
+
el = _ref8[_l];
|
1815
|
+
if (typeof el.files[0] !== 'undefined') {
|
1816
|
+
bodyParam.append($(el).attr('name'), el.files[0]);
|
1817
|
+
params += 1;
|
1818
|
+
}
|
1819
|
+
}
|
1820
|
+
this.invocationUrl = this.model.supportHeaderParams() ? (headerParams = this.model.getHeaderParams(map), this.model.urlify(map, false)) : this.model.urlify(map, true);
|
1821
|
+
$(".request_url", $(this.el)).html("<pre></pre>");
|
1822
|
+
$(".request_url pre", $(this.el)).text(this.invocationUrl);
|
1823
|
+
obj = {
|
1824
|
+
type: this.model.method,
|
1825
|
+
url: this.invocationUrl,
|
1826
|
+
headers: headerParams,
|
1827
|
+
data: bodyParam,
|
1828
|
+
dataType: 'json',
|
1829
|
+
contentType: false,
|
1830
|
+
processData: false,
|
1831
|
+
error: function(data, textStatus, error) {
|
1832
|
+
return _this.showErrorStatus(_this.wrap(data), _this);
|
1833
|
+
},
|
1834
|
+
success: function(data) {
|
1835
|
+
return _this.showResponse(data, _this);
|
1836
|
+
},
|
1837
|
+
complete: function(data) {
|
1838
|
+
return _this.showCompleteStatus(_this.wrap(data), _this);
|
1839
|
+
}
|
1840
|
+
};
|
1841
|
+
if (window.authorizations) {
|
1842
|
+
window.authorizations.apply(obj);
|
1843
|
+
}
|
1844
|
+
if (params === 0) {
|
1845
|
+
obj.data.append("fake", "true");
|
1846
|
+
}
|
1847
|
+
jQuery.ajax(obj);
|
1848
|
+
return false;
|
1849
|
+
};
|
1850
|
+
|
1851
|
+
OperationView.prototype.wrap = function(data) {
|
1852
|
+
var h, headerArray, headers, i, o, _i, _len;
|
1853
|
+
headers = {};
|
1854
|
+
headerArray = data.getAllResponseHeaders().split("\r");
|
1855
|
+
for (_i = 0, _len = headerArray.length; _i < _len; _i++) {
|
1856
|
+
i = headerArray[_i];
|
1857
|
+
h = i.split(':');
|
1858
|
+
if (h[0] !== void 0 && h[1] !== void 0) {
|
1859
|
+
headers[h[0].trim()] = h[1].trim();
|
1860
|
+
}
|
1861
|
+
}
|
1862
|
+
o = {};
|
1863
|
+
o.content = {};
|
1864
|
+
o.content.data = data.responseText;
|
1865
|
+
o.headers = headers;
|
1866
|
+
o.request = {};
|
1867
|
+
o.request.url = this.invocationUrl;
|
1868
|
+
o.status = data.status;
|
1869
|
+
return o;
|
1870
|
+
};
|
1871
|
+
|
1872
|
+
OperationView.prototype.getSelectedValue = function(select) {
|
1873
|
+
var opt, options, _i, _len, _ref5;
|
1874
|
+
if (!select.multiple) {
|
1875
|
+
return select.value;
|
1876
|
+
} else {
|
1877
|
+
options = [];
|
1878
|
+
_ref5 = select.options;
|
1879
|
+
for (_i = 0, _len = _ref5.length; _i < _len; _i++) {
|
1880
|
+
opt = _ref5[_i];
|
1881
|
+
if (opt.selected) {
|
1882
|
+
options.push(opt.value);
|
1603
1883
|
}
|
1604
|
-
};
|
1605
|
-
paramContentTypeField = $("td select[name=contentType]", $(this.el)).val();
|
1606
|
-
if (paramContentTypeField) {
|
1607
|
-
obj.contentType = paramContentTypeField;
|
1608
1884
|
}
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
|
1885
|
+
if (options.length > 0) {
|
1886
|
+
return options.join(",");
|
1887
|
+
} else {
|
1888
|
+
return null;
|
1613
1889
|
}
|
1614
|
-
jQuery.ajax(obj);
|
1615
|
-
return false;
|
1616
1890
|
}
|
1617
1891
|
};
|
1618
1892
|
|
@@ -1630,12 +1904,12 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1630
1904
|
return $(".response_body", $(this.el)).html(escape(prettyJson));
|
1631
1905
|
};
|
1632
1906
|
|
1633
|
-
OperationView.prototype.showErrorStatus = function(data) {
|
1634
|
-
return
|
1907
|
+
OperationView.prototype.showErrorStatus = function(data, parent) {
|
1908
|
+
return parent.showStatus(data);
|
1635
1909
|
};
|
1636
1910
|
|
1637
|
-
OperationView.prototype.showCompleteStatus = function(data) {
|
1638
|
-
return
|
1911
|
+
OperationView.prototype.showCompleteStatus = function(data, parent) {
|
1912
|
+
return parent.showStatus(data);
|
1639
1913
|
};
|
1640
1914
|
|
1641
1915
|
OperationView.prototype.formatXml = function(xml) {
|
@@ -1691,9 +1965,9 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1691
1965
|
padding = '';
|
1692
1966
|
indent += transitions[fromTo];
|
1693
1967
|
padding = ((function() {
|
1694
|
-
var _j,
|
1968
|
+
var _j, _ref5, _results;
|
1695
1969
|
_results = [];
|
1696
|
-
for (j = _j = 0,
|
1970
|
+
for (j = _j = 0, _ref5 = indent; 0 <= _ref5 ? _j < _ref5 : _j > _ref5; j = 0 <= _ref5 ? ++_j : --_j) {
|
1697
1971
|
_results.push(' ');
|
1698
1972
|
}
|
1699
1973
|
return _results;
|
@@ -1711,28 +1985,56 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1711
1985
|
return formatted;
|
1712
1986
|
};
|
1713
1987
|
|
1714
|
-
OperationView.prototype.showStatus = function(
|
1715
|
-
var code, pre, response_body;
|
1716
|
-
|
1717
|
-
|
1988
|
+
OperationView.prototype.showStatus = function(response) {
|
1989
|
+
var code, content, contentType, headers, opts, pre, response_body, response_body_el, url;
|
1990
|
+
if (response.content === void 0) {
|
1991
|
+
content = response.data;
|
1992
|
+
url = response.url;
|
1993
|
+
} else {
|
1994
|
+
content = response.content.data;
|
1995
|
+
url = response.request.url;
|
1996
|
+
}
|
1997
|
+
headers = response.headers;
|
1998
|
+
contentType = headers && headers["Content-Type"] ? headers["Content-Type"].split(";")[0].trim() : null;
|
1999
|
+
if (!content) {
|
2000
|
+
code = $('<code />').text("no content");
|
2001
|
+
pre = $('<pre class="json" />').append(code);
|
2002
|
+
} else if (contentType === "application/json" || /\+json$/.test(contentType)) {
|
2003
|
+
code = $('<code />').text(JSON.stringify(JSON.parse(content), null, " "));
|
1718
2004
|
pre = $('<pre class="json" />').append(code);
|
1719
|
-
}
|
1720
|
-
code = $('<code />').text(this.formatXml(
|
2005
|
+
} else if (contentType === "application/xml" || /\+xml$/.test(contentType)) {
|
2006
|
+
code = $('<code />').text(this.formatXml(content));
|
1721
2007
|
pre = $('<pre class="xml" />').append(code);
|
2008
|
+
} else if (contentType === "text/html") {
|
2009
|
+
code = $('<code />').html(content);
|
2010
|
+
pre = $('<pre class="xml" />').append(code);
|
2011
|
+
} else if (/^image\//.test(contentType)) {
|
2012
|
+
pre = $('<img>').attr('src', url);
|
2013
|
+
} else {
|
2014
|
+
code = $('<code />').text(content);
|
2015
|
+
pre = $('<pre class="json" />').append(code);
|
1722
2016
|
}
|
1723
2017
|
response_body = pre;
|
1724
|
-
$(".
|
2018
|
+
$(".request_url", $(this.el)).html("<pre></pre>");
|
2019
|
+
$(".request_url pre", $(this.el)).text(url);
|
2020
|
+
$(".response_code", $(this.el)).html("<pre>" + response.status + "</pre>");
|
1725
2021
|
$(".response_body", $(this.el)).html(response_body);
|
1726
|
-
$(".response_headers", $(this.el)).html("<pre>" +
|
2022
|
+
$(".response_headers", $(this.el)).html("<pre>" + _.escape(JSON.stringify(response.headers, null, " ")).replace(/\n/g, "<br>") + "</pre>");
|
1727
2023
|
$(".response", $(this.el)).slideDown();
|
1728
2024
|
$(".response_hider", $(this.el)).show();
|
1729
2025
|
$(".response_throbber", $(this.el)).hide();
|
1730
|
-
|
2026
|
+
response_body_el = $('.response_body', $(this.el))[0];
|
2027
|
+
opts = this.options.swaggerOptions;
|
2028
|
+
if (opts.highlightSizeThreshold && response.data.length > opts.highlightSizeThreshold) {
|
2029
|
+
return response_body_el;
|
2030
|
+
} else {
|
2031
|
+
return hljs.highlightBlock(response_body_el);
|
2032
|
+
}
|
1731
2033
|
};
|
1732
2034
|
|
1733
2035
|
OperationView.prototype.toggleOperationContent = function() {
|
1734
2036
|
var elem;
|
1735
|
-
elem = $('#' + this.model.
|
2037
|
+
elem = $('#' + Docs.escapeResourceName(this.model.parentId) + "_" + this.model.nickname + "_content");
|
1736
2038
|
if (elem.is(':visible')) {
|
1737
2039
|
return Docs.collapseOperation(elem);
|
1738
2040
|
} else {
|
@@ -1745,19 +2047,33 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1745
2047
|
})(Backbone.View);
|
1746
2048
|
|
1747
2049
|
StatusCodeView = (function(_super) {
|
1748
|
-
|
1749
2050
|
__extends(StatusCodeView, _super);
|
1750
2051
|
|
1751
2052
|
function StatusCodeView() {
|
1752
|
-
|
2053
|
+
_ref5 = StatusCodeView.__super__.constructor.apply(this, arguments);
|
2054
|
+
return _ref5;
|
1753
2055
|
}
|
1754
2056
|
|
1755
2057
|
StatusCodeView.prototype.initialize = function() {};
|
1756
2058
|
|
1757
2059
|
StatusCodeView.prototype.render = function() {
|
1758
|
-
var template;
|
2060
|
+
var responseModel, responseModelView, template;
|
1759
2061
|
template = this.template();
|
1760
2062
|
$(this.el).html(template(this.model));
|
2063
|
+
if (swaggerUi.api.models.hasOwnProperty(this.model.responseModel)) {
|
2064
|
+
responseModel = {
|
2065
|
+
sampleJSON: JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(), null, 2),
|
2066
|
+
isParam: false,
|
2067
|
+
signature: swaggerUi.api.models[this.model.responseModel].getMockSignature()
|
2068
|
+
};
|
2069
|
+
responseModelView = new SignatureView({
|
2070
|
+
model: responseModel,
|
2071
|
+
tagName: 'div'
|
2072
|
+
});
|
2073
|
+
$('.model-signature', this.$el).append(responseModelView.render().el);
|
2074
|
+
} else {
|
2075
|
+
$('.model-signature', this.$el).html('');
|
2076
|
+
}
|
1761
2077
|
return this;
|
1762
2078
|
};
|
1763
2079
|
|
@@ -1770,21 +2086,30 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1770
2086
|
})(Backbone.View);
|
1771
2087
|
|
1772
2088
|
ParameterView = (function(_super) {
|
1773
|
-
|
1774
2089
|
__extends(ParameterView, _super);
|
1775
2090
|
|
1776
2091
|
function ParameterView() {
|
1777
|
-
|
2092
|
+
_ref6 = ParameterView.__super__.constructor.apply(this, arguments);
|
2093
|
+
return _ref6;
|
1778
2094
|
}
|
1779
2095
|
|
1780
|
-
ParameterView.prototype.initialize = function() {
|
2096
|
+
ParameterView.prototype.initialize = function() {
|
2097
|
+
return Handlebars.registerHelper('isArray', function(param, opts) {
|
2098
|
+
if (param.type.toLowerCase() === 'array' || param.allowMultiple) {
|
2099
|
+
return opts.fn(this);
|
2100
|
+
} else {
|
2101
|
+
return opts.inverse(this);
|
2102
|
+
}
|
2103
|
+
});
|
2104
|
+
};
|
1781
2105
|
|
1782
2106
|
ParameterView.prototype.render = function() {
|
1783
|
-
var contentTypeModel,
|
2107
|
+
var contentTypeModel, isParam, parameterContentTypeView, responseContentTypeView, signatureModel, signatureView, template, type;
|
2108
|
+
type = this.model.type || this.model.dataType;
|
1784
2109
|
if (this.model.paramType === 'body') {
|
1785
2110
|
this.model.isBody = true;
|
1786
2111
|
}
|
1787
|
-
if (
|
2112
|
+
if (type.toLowerCase() === 'file') {
|
1788
2113
|
this.model.isFile = true;
|
1789
2114
|
}
|
1790
2115
|
template = this.template();
|
@@ -1803,19 +2128,25 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1803
2128
|
} else {
|
1804
2129
|
$('.model-signature', $(this.el)).html(this.model.signature);
|
1805
2130
|
}
|
2131
|
+
isParam = false;
|
2132
|
+
if (this.model.isBody) {
|
2133
|
+
isParam = true;
|
2134
|
+
}
|
1806
2135
|
contentTypeModel = {
|
1807
|
-
isParam:
|
2136
|
+
isParam: isParam
|
1808
2137
|
};
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
2138
|
+
contentTypeModel.consumes = this.model.consumes;
|
2139
|
+
if (isParam) {
|
2140
|
+
parameterContentTypeView = new ParameterContentTypeView({
|
2141
|
+
model: contentTypeModel
|
2142
|
+
});
|
2143
|
+
$('.parameter-content-type', $(this.el)).append(parameterContentTypeView.render().el);
|
2144
|
+
} else {
|
2145
|
+
responseContentTypeView = new ResponseContentTypeView({
|
2146
|
+
model: contentTypeModel
|
2147
|
+
});
|
2148
|
+
$('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);
|
1814
2149
|
}
|
1815
|
-
contentTypeView = new ContentTypeView({
|
1816
|
-
model: contentTypeModel
|
1817
|
-
});
|
1818
|
-
$('.content-type', $(this.el)).append(contentTypeView.render().el);
|
1819
2150
|
return this;
|
1820
2151
|
};
|
1821
2152
|
|
@@ -1844,11 +2175,11 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1844
2175
|
})(Backbone.View);
|
1845
2176
|
|
1846
2177
|
SignatureView = (function(_super) {
|
1847
|
-
|
1848
2178
|
__extends(SignatureView, _super);
|
1849
2179
|
|
1850
2180
|
function SignatureView() {
|
1851
|
-
|
2181
|
+
_ref7 = SignatureView.__super__.constructor.apply(this, arguments);
|
2182
|
+
return _ref7;
|
1852
2183
|
}
|
1853
2184
|
|
1854
2185
|
SignatureView.prototype.events = {
|
@@ -1863,7 +2194,7 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1863
2194
|
var template;
|
1864
2195
|
template = this.template();
|
1865
2196
|
$(this.el).html(template(this.model));
|
1866
|
-
this.
|
2197
|
+
this.switchToSnippet();
|
1867
2198
|
this.isParam = this.model.isParam;
|
1868
2199
|
if (this.isParam) {
|
1869
2200
|
$('.notice', $(this.el)).text('Click to set as parameter value');
|
@@ -1913,11 +2244,11 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1913
2244
|
})(Backbone.View);
|
1914
2245
|
|
1915
2246
|
ContentTypeView = (function(_super) {
|
1916
|
-
|
1917
2247
|
__extends(ContentTypeView, _super);
|
1918
2248
|
|
1919
2249
|
function ContentTypeView() {
|
1920
|
-
|
2250
|
+
_ref8 = ContentTypeView.__super__.constructor.apply(this, arguments);
|
2251
|
+
return _ref8;
|
1921
2252
|
}
|
1922
2253
|
|
1923
2254
|
ContentTypeView.prototype.initialize = function() {};
|
@@ -1926,12 +2257,7 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1926
2257
|
var template;
|
1927
2258
|
template = this.template();
|
1928
2259
|
$(this.el).html(template(this.model));
|
1929
|
-
|
1930
|
-
if (this.isParam) {
|
1931
|
-
$('label[for=contentType]', $(this.el)).text('Parameter content type:');
|
1932
|
-
} else {
|
1933
|
-
$('label[for=contentType]', $(this.el)).text('Response Content Type');
|
1934
|
-
}
|
2260
|
+
$('label[for=contentType]', $(this.el)).text('Response Content Type');
|
1935
2261
|
return this;
|
1936
2262
|
};
|
1937
2263
|
|
@@ -1943,5 +2269,56 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1943
2269
|
|
1944
2270
|
})(Backbone.View);
|
1945
2271
|
|
1946
|
-
|
2272
|
+
ResponseContentTypeView = (function(_super) {
|
2273
|
+
__extends(ResponseContentTypeView, _super);
|
2274
|
+
|
2275
|
+
function ResponseContentTypeView() {
|
2276
|
+
_ref9 = ResponseContentTypeView.__super__.constructor.apply(this, arguments);
|
2277
|
+
return _ref9;
|
2278
|
+
}
|
2279
|
+
|
2280
|
+
ResponseContentTypeView.prototype.initialize = function() {};
|
2281
|
+
|
2282
|
+
ResponseContentTypeView.prototype.render = function() {
|
2283
|
+
var template;
|
2284
|
+
template = this.template();
|
2285
|
+
$(this.el).html(template(this.model));
|
2286
|
+
$('label[for=responseContentType]', $(this.el)).text('Response Content Type');
|
2287
|
+
return this;
|
2288
|
+
};
|
1947
2289
|
|
2290
|
+
ResponseContentTypeView.prototype.template = function() {
|
2291
|
+
return Handlebars.templates.response_content_type;
|
2292
|
+
};
|
2293
|
+
|
2294
|
+
return ResponseContentTypeView;
|
2295
|
+
|
2296
|
+
})(Backbone.View);
|
2297
|
+
|
2298
|
+
ParameterContentTypeView = (function(_super) {
|
2299
|
+
__extends(ParameterContentTypeView, _super);
|
2300
|
+
|
2301
|
+
function ParameterContentTypeView() {
|
2302
|
+
_ref10 = ParameterContentTypeView.__super__.constructor.apply(this, arguments);
|
2303
|
+
return _ref10;
|
2304
|
+
}
|
2305
|
+
|
2306
|
+
ParameterContentTypeView.prototype.initialize = function() {};
|
2307
|
+
|
2308
|
+
ParameterContentTypeView.prototype.render = function() {
|
2309
|
+
var template;
|
2310
|
+
template = this.template();
|
2311
|
+
$(this.el).html(template(this.model));
|
2312
|
+
$('label[for=parameterContentType]', $(this.el)).text('Parameter content type:');
|
2313
|
+
return this;
|
2314
|
+
};
|
2315
|
+
|
2316
|
+
ParameterContentTypeView.prototype.template = function() {
|
2317
|
+
return Handlebars.templates.parameter_content_type;
|
2318
|
+
};
|
2319
|
+
|
2320
|
+
return ParameterContentTypeView;
|
2321
|
+
|
2322
|
+
})(Backbone.View);
|
2323
|
+
|
2324
|
+
}).call(this);
|