swagger-ui_rails 0.0.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +1 -1
- data/app/assets/javascripts/lib/handlebars-1.0.0.js +2278 -0
- data/app/assets/javascripts/lib/shred.bundle.js +2765 -0
- data/app/assets/javascripts/lib/shred/content.js +193 -0
- data/app/assets/javascripts/lib/swagger.js +907 -272
- data/app/assets/javascripts/swagger-ui.js +1227 -1127
- data/app/assets/javascripts/swagger-ui.min.js +1 -1
- data/app/assets/stylesheets/hightlight.default.css +1 -1
- data/app/assets/stylesheets/screen.css +1043 -1732
- data/app/views/swagger_ui/_swagger_ui.html.erb +1 -1
- data/lib/swagger-ui_rails/version.rb +1 -1
- metadata +12 -22
- data/app/assets/javascripts/lib/handlebars-1.0.rc.1.js +0 -1920
@@ -1,8 +1,9 @@
|
|
1
|
+
//= require lib/shred.bundle.js
|
1
2
|
//= require lib/jquery-1.8.0.min.js
|
2
3
|
//= require lib/jquery.slideto.min.js
|
3
4
|
//= require lib/jquery.wiggle.min.js
|
4
5
|
//= require lib/jquery.ba-bbq.min.js
|
5
|
-
//= require lib/handlebars-1.0.
|
6
|
+
//= require lib/handlebars-1.0.0.js
|
6
7
|
//= require lib/underscore-min.js
|
7
8
|
//= require lib/backbone-min.js
|
8
9
|
//= require lib/swagger.js
|
@@ -11,54 +12,55 @@
|
|
11
12
|
|
12
13
|
$(function() {
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
15
|
+
// buja!
|
16
|
+
// Helper function for vertically aligning DOM elements
|
17
|
+
// http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/
|
18
|
+
$.fn.vAlign = function() {
|
19
|
+
return this.each(function(i){
|
20
|
+
var ah = $(this).height();
|
21
|
+
var ph = $(this).parent().height();
|
22
|
+
var mh = (ph - ah) / 2;
|
23
|
+
$(this).css('margin-top', mh);
|
24
|
+
});
|
25
|
+
};
|
26
|
+
|
27
|
+
$.fn.stretchFormtasticInputWidthToParent = function() {
|
28
|
+
return this.each(function(i){
|
29
|
+
var p_width = $(this).closest("form").innerWidth();
|
30
|
+
var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest("form").css('padding-right'), 10);
|
31
|
+
var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);
|
32
|
+
$(this).css('width', p_width - p_padding - this_padding);
|
33
|
+
});
|
34
|
+
};
|
35
|
+
|
36
|
+
$('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent();
|
37
|
+
|
38
|
+
// Vertically center these paragraphs
|
39
|
+
// Parent may need a min-height for this to work..
|
40
|
+
$('ul.downplayed li div.content p').vAlign();
|
41
|
+
|
42
|
+
// When a sandbox form is submitted..
|
43
|
+
$("form.sandbox").submit(function(){
|
44
|
+
|
45
|
+
var error_free = true;
|
46
|
+
|
47
|
+
// Cycle through the forms required inputs
|
48
|
+
$(this).find("input.required").each(function() {
|
49
|
+
|
50
|
+
// Remove any existing error styles from the input
|
51
|
+
$(this).removeClass('error');
|
52
|
+
|
53
|
+
// Tack the error style on if the input is empty..
|
54
|
+
if ($(this).val() == '') {
|
55
|
+
$(this).addClass('error');
|
56
|
+
$(this).wiggle();
|
57
|
+
error_free = false;
|
58
|
+
}
|
57
59
|
|
58
|
-
|
60
|
+
});
|
59
61
|
|
60
|
-
|
61
|
-
|
62
|
+
return error_free;
|
63
|
+
});
|
62
64
|
|
63
65
|
});
|
64
66
|
|
@@ -87,1159 +89,1124 @@ if (Function.prototype.bind && console && typeof console.log == "object") {
|
|
87
89
|
|
88
90
|
var Docs = {
|
89
91
|
|
90
|
-
|
92
|
+
shebang: function() {
|
91
93
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
94
|
+
// If shebang has an operation nickname in it..
|
95
|
+
// e.g. /docs/#!/words/get_search
|
96
|
+
var fragments = $.param.fragment().split('/');
|
97
|
+
fragments.shift(); // get rid of the bang
|
96
98
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
//
|
101
|
-
|
99
|
+
switch (fragments.length) {
|
100
|
+
case 1:
|
101
|
+
// Expand all operations for the resource and scroll to it
|
102
|
+
// log('shebang resource:' + fragments[0]);
|
103
|
+
var dom_id = 'resource_' + fragments[0];
|
102
104
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
//
|
105
|
+
Docs.expandEndpointListForResource(fragments[0]);
|
106
|
+
$("#"+dom_id).slideto({highlight: false});
|
107
|
+
break;
|
108
|
+
case 2:
|
109
|
+
// Refer to the endpoint DOM element, e.g. #words_get_search
|
110
|
+
// log('shebang endpoint: ' + fragments.join('_'));
|
109
111
|
|
110
112
|
// Expand Resource
|
111
113
|
Docs.expandEndpointListForResource(fragments[0]);
|
112
114
|
$("#"+dom_id).slideto({highlight: false});
|
113
115
|
|
114
116
|
// Expand operation
|
115
|
-
|
116
|
-
|
117
|
+
var li_dom_id = fragments.join('_');
|
118
|
+
var li_content_dom_id = li_dom_id + "_content";
|
117
119
|
|
118
120
|
// log("li_dom_id " + li_dom_id);
|
119
121
|
// log("li_content_dom_id " + li_content_dom_id);
|
120
122
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
123
|
+
Docs.expandOperation($('#'+li_content_dom_id));
|
124
|
+
$('#'+li_dom_id).slideto({highlight: false});
|
125
|
+
break;
|
126
|
+
}
|
127
|
+
|
128
|
+
},
|
129
|
+
|
130
|
+
toggleEndpointListForResource: function(resource) {
|
131
|
+
var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints');
|
132
|
+
if (elem.is(':visible')) {
|
133
|
+
Docs.collapseEndpointListForResource(resource);
|
134
|
+
} else {
|
135
|
+
Docs.expandEndpointListForResource(resource);
|
136
|
+
}
|
137
|
+
},
|
138
|
+
|
139
|
+
// Expand resource
|
140
|
+
expandEndpointListForResource: function(resource) {
|
141
|
+
var resource = Docs.escapeResourceName(resource);
|
142
|
+
if (resource == '') {
|
143
|
+
$('.resource ul.endpoints').slideDown();
|
144
|
+
return;
|
145
|
+
}
|
146
|
+
|
147
|
+
$('li#resource_' + resource).addClass('active');
|
148
|
+
|
149
|
+
var elem = $('li#resource_' + resource + ' ul.endpoints');
|
150
|
+
elem.slideDown();
|
151
|
+
},
|
152
|
+
|
153
|
+
// Collapse resource and mark as explicitly closed
|
154
|
+
collapseEndpointListForResource: function(resource) {
|
155
|
+
var resource = Docs.escapeResourceName(resource);
|
156
|
+
$('li#resource_' + resource).removeClass('active');
|
157
|
+
|
158
|
+
var elem = $('li#resource_' + resource + ' ul.endpoints');
|
159
|
+
elem.slideUp();
|
160
|
+
},
|
161
|
+
|
162
|
+
expandOperationsForResource: function(resource) {
|
163
|
+
// Make sure the resource container is open..
|
164
|
+
Docs.expandEndpointListForResource(resource);
|
165
|
+
|
166
|
+
if (resource == '') {
|
167
|
+
$('.resource ul.endpoints li.operation div.content').slideDown();
|
168
|
+
return;
|
169
|
+
}
|
170
|
+
|
171
|
+
$('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {
|
172
|
+
Docs.expandOperation($(this));
|
173
|
+
});
|
174
|
+
},
|
175
|
+
|
176
|
+
collapseOperationsForResource: function(resource) {
|
177
|
+
// Make sure the resource container is open..
|
178
|
+
Docs.expandEndpointListForResource(resource);
|
179
|
+
|
180
|
+
$('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {
|
181
|
+
Docs.collapseOperation($(this));
|
182
|
+
});
|
183
|
+
},
|
184
|
+
|
185
|
+
escapeResourceName: function(resource) {
|
186
|
+
return resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g, "\\$&");
|
187
|
+
},
|
188
|
+
|
189
|
+
expandOperation: function(elem) {
|
190
|
+
elem.slideDown();
|
191
|
+
},
|
192
|
+
|
193
|
+
collapseOperation: function(elem) {
|
194
|
+
elem.slideUp();
|
195
|
+
}
|
194
196
|
|
195
197
|
};
|
196
198
|
(function() {
|
197
199
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
198
200
|
templates['content_type'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
199
|
-
|
200
|
-
|
201
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
202
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
203
|
+
var buffer = "", stack1, functionType="function", self=this;
|
201
204
|
|
202
205
|
function program1(depth0,data) {
|
203
|
-
|
204
|
-
var buffer = "", stack1
|
205
|
-
buffer += "\n
|
206
|
-
|
207
|
-
stack1 = foundHelper || depth0.produces;
|
208
|
-
stack2 = helpers.each;
|
209
|
-
tmp1 = self.program(2, program2, data);
|
210
|
-
tmp1.hash = {};
|
211
|
-
tmp1.fn = tmp1;
|
212
|
-
tmp1.inverse = self.noop;
|
213
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
206
|
+
|
207
|
+
var buffer = "", stack1;
|
208
|
+
buffer += "\n ";
|
209
|
+
stack1 = helpers.each.call(depth0, depth0.produces, {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data});
|
214
210
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
215
211
|
buffer += "\n";
|
216
|
-
return buffer;
|
212
|
+
return buffer;
|
213
|
+
}
|
217
214
|
function program2(depth0,data) {
|
218
|
-
|
215
|
+
|
219
216
|
var buffer = "", stack1;
|
220
|
-
buffer += "\n
|
221
|
-
stack1 = depth0;
|
222
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
223
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this", { hash: {} }); }
|
217
|
+
buffer += "\n <option value=\"";
|
218
|
+
stack1 = (typeof depth0 === functionType ? depth0.apply(depth0) : depth0);
|
224
219
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
225
220
|
buffer += "\">";
|
226
|
-
stack1 = depth0;
|
227
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
228
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this", { hash: {} }); }
|
221
|
+
stack1 = (typeof depth0 === functionType ? depth0.apply(depth0) : depth0);
|
229
222
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
230
|
-
buffer += "</option>\n
|
231
|
-
return buffer;
|
223
|
+
buffer += "</option>\n ";
|
224
|
+
return buffer;
|
225
|
+
}
|
232
226
|
|
233
227
|
function program4(depth0,data) {
|
234
|
-
|
235
|
-
|
236
|
-
return "\n
|
228
|
+
|
229
|
+
|
230
|
+
return "\n <option value=\"application/json\">application/json</option>\n";
|
231
|
+
}
|
237
232
|
|
238
233
|
buffer += "<label for=\"contentType\"></label>\n<select name=\"contentType\">\n";
|
239
|
-
|
240
|
-
stack1 = foundHelper || depth0.produces;
|
241
|
-
stack2 = helpers['if'];
|
242
|
-
tmp1 = self.program(1, program1, data);
|
243
|
-
tmp1.hash = {};
|
244
|
-
tmp1.fn = tmp1;
|
245
|
-
tmp1.inverse = self.program(4, program4, data);
|
246
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
234
|
+
stack1 = helpers['if'].call(depth0, depth0.produces, {hash:{},inverse:self.program(4, program4, data),fn:self.program(1, program1, data),data:data});
|
247
235
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
248
236
|
buffer += "\n</select>\n";
|
249
|
-
return buffer;
|
237
|
+
return buffer;
|
238
|
+
});
|
250
239
|
})();
|
251
240
|
|
252
241
|
(function() {
|
253
242
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
254
243
|
templates['main'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
255
|
-
|
256
|
-
|
244
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
245
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
246
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
257
247
|
|
258
248
|
function program1(depth0,data) {
|
259
|
-
|
249
|
+
|
250
|
+
var buffer = "", stack1, stack2;
|
251
|
+
buffer += "\n <div class=\"info_title\">"
|
252
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.title)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
253
|
+
+ "</div>\n <div class=\"info_description\">";
|
254
|
+
stack2 = ((stack1 = ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.description)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1);
|
255
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
256
|
+
buffer += "</div>\n ";
|
257
|
+
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});
|
258
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
259
|
+
buffer += "\n ";
|
260
|
+
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});
|
261
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
262
|
+
buffer += "\n ";
|
263
|
+
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});
|
264
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
265
|
+
buffer += "\n ";
|
266
|
+
return buffer;
|
267
|
+
}
|
268
|
+
function program2(depth0,data) {
|
269
|
+
|
270
|
+
var buffer = "", stack1;
|
271
|
+
buffer += "<div class=\"info_tos\"><a href=\""
|
272
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.termsOfServiceUrl)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
273
|
+
+ "\">Terms of service</a></div>";
|
274
|
+
return buffer;
|
275
|
+
}
|
276
|
+
|
277
|
+
function program4(depth0,data) {
|
278
|
+
|
279
|
+
var buffer = "", stack1;
|
280
|
+
buffer += "<div class='info_contact'><a href=\"mailto:"
|
281
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.contact)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
282
|
+
+ "\">Contact the developer</a></div>";
|
283
|
+
return buffer;
|
284
|
+
}
|
285
|
+
|
286
|
+
function program6(depth0,data) {
|
287
|
+
|
288
|
+
var buffer = "", stack1;
|
289
|
+
buffer += "<div class='info_license'><a href='"
|
290
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.licenseUrl)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
291
|
+
+ "'>"
|
292
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.info),stack1 == null || stack1 === false ? stack1 : stack1.license)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
293
|
+
+ "</a></div>";
|
294
|
+
return buffer;
|
295
|
+
}
|
296
|
+
|
297
|
+
function program8(depth0,data) {
|
298
|
+
|
260
299
|
var buffer = "", stack1;
|
261
300
|
buffer += "\n , <span style=\"font-variant: small-caps\">api version</span>: ";
|
262
|
-
|
263
|
-
stack1 =
|
264
|
-
|
265
|
-
|
266
|
-
buffer
|
267
|
-
|
268
|
-
|
269
|
-
buffer += "
|
270
|
-
|
271
|
-
stack1
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
tmp1 = self.program(1, program1, data);
|
279
|
-
tmp1.hash = {};
|
280
|
-
tmp1.fn = tmp1;
|
281
|
-
tmp1.inverse = self.noop;
|
282
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
301
|
+
if (stack1 = helpers.apiVersion) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
302
|
+
else { stack1 = depth0.apiVersion; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
303
|
+
buffer += escapeExpression(stack1)
|
304
|
+
+ "\n ";
|
305
|
+
return buffer;
|
306
|
+
}
|
307
|
+
|
308
|
+
buffer += "<div class='info' id='api_info'>\n ";
|
309
|
+
stack1 = helpers['if'].call(depth0, depth0.info, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
310
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
311
|
+
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>: ";
|
312
|
+
if (stack1 = helpers.basePath) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
313
|
+
else { stack1 = depth0.basePath; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
314
|
+
buffer += escapeExpression(stack1)
|
315
|
+
+ "\n ";
|
316
|
+
stack1 = helpers['if'].call(depth0, depth0.apiVersion, {hash:{},inverse:self.noop,fn:self.program(8, program8, data),data:data});
|
283
317
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
284
318
|
buffer += "]</h4>\n </div>\n</div>\n";
|
285
|
-
return buffer;
|
319
|
+
return buffer;
|
320
|
+
});
|
286
321
|
})();
|
287
322
|
|
288
323
|
(function() {
|
289
324
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
290
325
|
templates['operation'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
291
|
-
|
292
|
-
|
326
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
327
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
328
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
293
329
|
|
294
330
|
function program1(depth0,data) {
|
295
|
-
|
331
|
+
|
296
332
|
var buffer = "", stack1;
|
297
|
-
buffer += "\n
|
298
|
-
|
299
|
-
stack1 =
|
300
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
301
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "notes", { hash: {} }); }
|
333
|
+
buffer += "\n <h4>Implementation Notes</h4>\n <p>";
|
334
|
+
if (stack1 = helpers.notes) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
335
|
+
else { stack1 = depth0.notes; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
302
336
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
303
|
-
buffer += "</p>\n
|
304
|
-
return buffer;
|
337
|
+
buffer += "</p>\n ";
|
338
|
+
return buffer;
|
339
|
+
}
|
305
340
|
|
306
341
|
function program3(depth0,data) {
|
307
|
-
|
308
|
-
|
309
|
-
return "\n
|
342
|
+
|
343
|
+
|
344
|
+
return "\n <h4>Response Class</h4>\n <p><span class=\"model-signature\" /></p>\n <br/>\n <div class=\"response-content-type\" />\n ";
|
345
|
+
}
|
310
346
|
|
311
347
|
function program5(depth0,data) {
|
312
|
-
|
313
|
-
|
314
|
-
return "\n
|
348
|
+
|
349
|
+
|
350
|
+
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 ";
|
351
|
+
}
|
315
352
|
|
316
353
|
function program7(depth0,data) {
|
317
|
-
|
318
|
-
|
319
|
-
return "\n
|
354
|
+
|
355
|
+
|
356
|
+
return "\n <div style='margin:0;padding:0;display:inline'></div>\n <h4>Error Status Codes</h4>\n <table class='fullwidth'>\n <thead>\n <tr>\n <th>HTTP Status Code</th>\n <th>Reason</th>\n </tr>\n </thead>\n <tbody class=\"operation-status\">\n \n </tbody>\n </table>\n ";
|
357
|
+
}
|
320
358
|
|
321
359
|
function program9(depth0,data) {
|
322
|
-
|
323
|
-
|
324
|
-
return "\n
|
360
|
+
|
361
|
+
|
362
|
+
return "\n ";
|
363
|
+
}
|
325
364
|
|
326
365
|
function program11(depth0,data) {
|
327
|
-
|
328
|
-
|
329
|
-
return "\n
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
stack1 =
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
stack1 =
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
if(
|
350
|
-
else
|
351
|
-
buffer += escapeExpression(stack1)
|
352
|
-
|
353
|
-
stack1 =
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
stack1 =
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
if(
|
370
|
-
else
|
371
|
-
buffer += escapeExpression(stack1)
|
372
|
-
|
373
|
-
stack1 =
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
stack1 =
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
if(
|
390
|
-
else
|
391
|
-
buffer += escapeExpression(stack1)
|
392
|
-
|
393
|
-
stack1 =
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
stack1 =
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
if(
|
410
|
-
else
|
411
|
-
buffer += escapeExpression(stack1) + "/";
|
412
|
-
foundHelper = helpers.nickname;
|
413
|
-
stack1 = foundHelper || depth0.nickname;
|
414
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
415
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "nickname", { hash: {} }); }
|
416
|
-
buffer += escapeExpression(stack1) + "_";
|
417
|
-
foundHelper = helpers.httpMethod;
|
418
|
-
stack1 = foundHelper || depth0.httpMethod;
|
419
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
420
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
|
421
|
-
buffer += escapeExpression(stack1) + "_";
|
422
|
-
foundHelper = helpers.number;
|
423
|
-
stack1 = foundHelper || depth0.number;
|
424
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
425
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "number", { hash: {} }); }
|
426
|
-
buffer += escapeExpression(stack1) + "' class=\"toggleOperation\">";
|
427
|
-
foundHelper = helpers.summary;
|
428
|
-
stack1 = foundHelper || depth0.summary;
|
429
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
430
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "summary", { hash: {} }); }
|
366
|
+
|
367
|
+
|
368
|
+
return "\n <div class='sandbox_header'>\n <input class='submit' name='commit' type='button' value='Try it out!' />\n <a href='#' class='response_hider' style='display:none'>Hide Response</a>\n <img alt='Throbber' class='response_throbber' src='images/throbber.gif' style='display:none' />\n </div>\n ";
|
369
|
+
}
|
370
|
+
|
371
|
+
buffer += "\n <ul class='operations' >\n <li class='";
|
372
|
+
if (stack1 = helpers.method) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
373
|
+
else { stack1 = depth0.method; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
374
|
+
buffer += escapeExpression(stack1)
|
375
|
+
+ " operation' id='";
|
376
|
+
if (stack1 = helpers.resourceName) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
377
|
+
else { stack1 = depth0.resourceName; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
378
|
+
buffer += escapeExpression(stack1)
|
379
|
+
+ "_";
|
380
|
+
if (stack1 = helpers.nickname) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
381
|
+
else { stack1 = depth0.nickname; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
382
|
+
buffer += escapeExpression(stack1)
|
383
|
+
+ "_";
|
384
|
+
if (stack1 = helpers.method) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
385
|
+
else { stack1 = depth0.method; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
386
|
+
buffer += escapeExpression(stack1)
|
387
|
+
+ "_";
|
388
|
+
if (stack1 = helpers.number) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
389
|
+
else { stack1 = depth0.number; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
390
|
+
buffer += escapeExpression(stack1)
|
391
|
+
+ "'>\n <div class='heading'>\n <h3>\n <span class='http_method'>\n <a href='#!/";
|
392
|
+
if (stack1 = helpers.resourceName) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
393
|
+
else { stack1 = depth0.resourceName; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
394
|
+
buffer += escapeExpression(stack1)
|
395
|
+
+ "/";
|
396
|
+
if (stack1 = helpers.nickname) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
397
|
+
else { stack1 = depth0.nickname; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
398
|
+
buffer += escapeExpression(stack1)
|
399
|
+
+ "_";
|
400
|
+
if (stack1 = helpers.method) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
401
|
+
else { stack1 = depth0.method; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
402
|
+
buffer += escapeExpression(stack1)
|
403
|
+
+ "_";
|
404
|
+
if (stack1 = helpers.number) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
405
|
+
else { stack1 = depth0.number; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
406
|
+
buffer += escapeExpression(stack1)
|
407
|
+
+ "' class=\"toggleOperation\">";
|
408
|
+
if (stack1 = helpers.method) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
409
|
+
else { stack1 = depth0.method; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
410
|
+
buffer += escapeExpression(stack1)
|
411
|
+
+ "</a>\n </span>\n <span class='path'>\n <a href='#!/";
|
412
|
+
if (stack1 = helpers.resourceName) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
413
|
+
else { stack1 = depth0.resourceName; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
414
|
+
buffer += escapeExpression(stack1)
|
415
|
+
+ "/";
|
416
|
+
if (stack1 = helpers.nickname) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
417
|
+
else { stack1 = depth0.nickname; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
418
|
+
buffer += escapeExpression(stack1)
|
419
|
+
+ "_";
|
420
|
+
if (stack1 = helpers.method) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
421
|
+
else { stack1 = depth0.method; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
422
|
+
buffer += escapeExpression(stack1)
|
423
|
+
+ "_";
|
424
|
+
if (stack1 = helpers.number) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
425
|
+
else { stack1 = depth0.number; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
426
|
+
buffer += escapeExpression(stack1)
|
427
|
+
+ "' class=\"toggleOperation\">";
|
428
|
+
if (stack1 = helpers.path) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
429
|
+
else { stack1 = depth0.path; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
430
|
+
buffer += escapeExpression(stack1)
|
431
|
+
+ "</a>\n </span>\n </h3>\n <ul class='options'>\n <li>\n <a href='#!/";
|
432
|
+
if (stack1 = helpers.resourceName) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
433
|
+
else { stack1 = depth0.resourceName; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
434
|
+
buffer += escapeExpression(stack1)
|
435
|
+
+ "/";
|
436
|
+
if (stack1 = helpers.nickname) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
437
|
+
else { stack1 = depth0.nickname; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
438
|
+
buffer += escapeExpression(stack1)
|
439
|
+
+ "_";
|
440
|
+
if (stack1 = helpers.method) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
441
|
+
else { stack1 = depth0.method; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
442
|
+
buffer += escapeExpression(stack1)
|
443
|
+
+ "_";
|
444
|
+
if (stack1 = helpers.number) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
445
|
+
else { stack1 = depth0.number; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
446
|
+
buffer += escapeExpression(stack1)
|
447
|
+
+ "' class=\"toggleOperation\">";
|
448
|
+
if (stack1 = helpers.summary) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
449
|
+
else { stack1 = depth0.summary; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
431
450
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
432
|
-
buffer += "</a>\n
|
433
|
-
|
434
|
-
stack1 =
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
if(
|
446
|
-
else
|
447
|
-
buffer += escapeExpression(stack1)
|
448
|
-
|
449
|
-
stack1 =
|
450
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
451
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "number", { hash: {} }); }
|
452
|
-
buffer += escapeExpression(stack1) + "_content' style='display:none'>\n ";
|
453
|
-
foundHelper = helpers.notes;
|
454
|
-
stack1 = foundHelper || depth0.notes;
|
455
|
-
stack2 = helpers['if'];
|
456
|
-
tmp1 = self.program(1, program1, data);
|
457
|
-
tmp1.hash = {};
|
458
|
-
tmp1.fn = tmp1;
|
459
|
-
tmp1.inverse = self.noop;
|
460
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
451
|
+
buffer += "</a>\n </li>\n </ul>\n </div>\n <div class='content' id='";
|
452
|
+
if (stack1 = helpers.resourceName) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
453
|
+
else { stack1 = depth0.resourceName; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
454
|
+
buffer += escapeExpression(stack1)
|
455
|
+
+ "_";
|
456
|
+
if (stack1 = helpers.nickname) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
457
|
+
else { stack1 = depth0.nickname; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
458
|
+
buffer += escapeExpression(stack1)
|
459
|
+
+ "_";
|
460
|
+
if (stack1 = helpers.method) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
461
|
+
else { stack1 = depth0.method; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
462
|
+
buffer += escapeExpression(stack1)
|
463
|
+
+ "_";
|
464
|
+
if (stack1 = helpers.number) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
465
|
+
else { stack1 = depth0.number; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
466
|
+
buffer += escapeExpression(stack1)
|
467
|
+
+ "_content' style='display:none'>\n ";
|
468
|
+
stack1 = helpers['if'].call(depth0, depth0.notes, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
461
469
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
462
|
-
buffer += "\n
|
463
|
-
|
464
|
-
stack1 = foundHelper || depth0.responseClass;
|
465
|
-
stack2 = helpers['if'];
|
466
|
-
tmp1 = self.program(3, program3, data);
|
467
|
-
tmp1.hash = {};
|
468
|
-
tmp1.fn = tmp1;
|
469
|
-
tmp1.inverse = self.noop;
|
470
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
470
|
+
buffer += "\n ";
|
471
|
+
stack1 = helpers['if'].call(depth0, depth0.type, {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
|
471
472
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
472
|
-
buffer += "\n
|
473
|
-
|
474
|
-
stack1 = foundHelper || depth0.parameters;
|
475
|
-
stack2 = helpers['if'];
|
476
|
-
tmp1 = self.program(5, program5, data);
|
477
|
-
tmp1.hash = {};
|
478
|
-
tmp1.fn = tmp1;
|
479
|
-
tmp1.inverse = self.noop;
|
480
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
473
|
+
buffer += "\n <form accept-charset='UTF-8' class='sandbox'>\n <div style='margin:0;padding:0;display:inline'></div>\n ";
|
474
|
+
stack1 = helpers['if'].call(depth0, depth0.parameters, {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data});
|
481
475
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
482
|
-
buffer += "\n
|
483
|
-
|
484
|
-
stack1 = foundHelper || depth0.errorResponses;
|
485
|
-
stack2 = helpers['if'];
|
486
|
-
tmp1 = self.program(7, program7, data);
|
487
|
-
tmp1.hash = {};
|
488
|
-
tmp1.fn = tmp1;
|
489
|
-
tmp1.inverse = self.noop;
|
490
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
476
|
+
buffer += "\n ";
|
477
|
+
stack1 = helpers['if'].call(depth0, depth0.responseMessages, {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data});
|
491
478
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
492
|
-
buffer += "\n
|
493
|
-
|
494
|
-
stack1 = foundHelper || depth0.isReadOnly;
|
495
|
-
stack2 = helpers['if'];
|
496
|
-
tmp1 = self.program(9, program9, data);
|
497
|
-
tmp1.hash = {};
|
498
|
-
tmp1.fn = tmp1;
|
499
|
-
tmp1.inverse = self.program(11, program11, data);
|
500
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
479
|
+
buffer += "\n ";
|
480
|
+
stack1 = helpers['if'].call(depth0, depth0.isReadOnly, {hash:{},inverse:self.program(11, program11, data),fn:self.program(9, program9, data),data:data});
|
501
481
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
502
|
-
buffer += "\n
|
503
|
-
return buffer;
|
482
|
+
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";
|
483
|
+
return buffer;
|
484
|
+
});
|
504
485
|
})();
|
505
486
|
|
506
487
|
(function() {
|
507
488
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
508
489
|
templates['param'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
509
|
-
|
510
|
-
|
490
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
491
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
492
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
511
493
|
|
512
494
|
function program1(depth0,data) {
|
513
|
-
|
514
|
-
var buffer = "", stack1
|
515
|
-
buffer += "\n
|
516
|
-
|
517
|
-
stack1 = foundHelper || depth0.isFile;
|
518
|
-
stack2 = helpers['if'];
|
519
|
-
tmp1 = self.program(2, program2, data);
|
520
|
-
tmp1.hash = {};
|
521
|
-
tmp1.fn = tmp1;
|
522
|
-
tmp1.inverse = self.program(4, program4, data);
|
523
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
495
|
+
|
496
|
+
var buffer = "", stack1;
|
497
|
+
buffer += "\n ";
|
498
|
+
stack1 = helpers['if'].call(depth0, depth0.isFile, {hash:{},inverse:self.program(4, program4, data),fn:self.program(2, program2, data),data:data});
|
524
499
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
525
|
-
buffer += "\n
|
526
|
-
return buffer;
|
500
|
+
buffer += "\n ";
|
501
|
+
return buffer;
|
502
|
+
}
|
527
503
|
function program2(depth0,data) {
|
528
|
-
|
504
|
+
|
529
505
|
var buffer = "", stack1;
|
530
|
-
buffer += "\n
|
531
|
-
|
532
|
-
stack1 =
|
533
|
-
|
534
|
-
|
535
|
-
buffer
|
536
|
-
|
506
|
+
buffer += "\n <input type=\"file\" name='";
|
507
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
508
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
509
|
+
buffer += escapeExpression(stack1)
|
510
|
+
+ "'/>\n <div class=\"parameter-content-type\" />\n ";
|
511
|
+
return buffer;
|
512
|
+
}
|
537
513
|
|
538
514
|
function program4(depth0,data) {
|
539
|
-
|
540
|
-
var buffer = "", stack1
|
541
|
-
buffer += "\n
|
542
|
-
|
543
|
-
stack1 = foundHelper || depth0.defaultValue;
|
544
|
-
stack2 = helpers['if'];
|
545
|
-
tmp1 = self.program(5, program5, data);
|
546
|
-
tmp1.hash = {};
|
547
|
-
tmp1.fn = tmp1;
|
548
|
-
tmp1.inverse = self.program(7, program7, data);
|
549
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
515
|
+
|
516
|
+
var buffer = "", stack1;
|
517
|
+
buffer += "\n ";
|
518
|
+
stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data});
|
550
519
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
551
|
-
buffer += "\n
|
552
|
-
return buffer;
|
520
|
+
buffer += "\n ";
|
521
|
+
return buffer;
|
522
|
+
}
|
553
523
|
function program5(depth0,data) {
|
554
|
-
|
524
|
+
|
555
525
|
var buffer = "", stack1;
|
556
|
-
buffer += "\n
|
557
|
-
|
558
|
-
stack1 =
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
return buffer;}
|
526
|
+
buffer += "\n <textarea class='body-textarea' name='";
|
527
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
528
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
529
|
+
buffer += escapeExpression(stack1)
|
530
|
+
+ "'>";
|
531
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
532
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
533
|
+
buffer += escapeExpression(stack1)
|
534
|
+
+ "</textarea>\n ";
|
535
|
+
return buffer;
|
536
|
+
}
|
568
537
|
|
569
538
|
function program7(depth0,data) {
|
570
|
-
|
539
|
+
|
571
540
|
var buffer = "", stack1;
|
572
|
-
buffer += "\n
|
573
|
-
|
574
|
-
stack1 =
|
575
|
-
|
576
|
-
|
577
|
-
buffer
|
578
|
-
|
541
|
+
buffer += "\n <textarea class='body-textarea' name='";
|
542
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
543
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
544
|
+
buffer += escapeExpression(stack1)
|
545
|
+
+ "'></textarea>\n <br />\n <div class=\"parameter-content-type\" />\n ";
|
546
|
+
return buffer;
|
547
|
+
}
|
579
548
|
|
580
549
|
function program9(depth0,data) {
|
581
|
-
|
582
|
-
var buffer = "", stack1
|
583
|
-
buffer += "\n
|
584
|
-
|
585
|
-
stack1 = foundHelper || depth0.defaultValue;
|
586
|
-
stack2 = helpers['if'];
|
587
|
-
tmp1 = self.program(10, program10, data);
|
588
|
-
tmp1.hash = {};
|
589
|
-
tmp1.fn = tmp1;
|
590
|
-
tmp1.inverse = self.program(12, program12, data);
|
591
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
550
|
+
|
551
|
+
var buffer = "", stack1;
|
552
|
+
buffer += "\n ";
|
553
|
+
stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(12, program12, data),fn:self.program(10, program10, data),data:data});
|
592
554
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
593
|
-
buffer += "\n
|
594
|
-
return buffer;
|
555
|
+
buffer += "\n ";
|
556
|
+
return buffer;
|
557
|
+
}
|
595
558
|
function program10(depth0,data) {
|
596
|
-
|
559
|
+
|
597
560
|
var buffer = "", stack1;
|
598
|
-
buffer += "\n
|
599
|
-
|
600
|
-
stack1 =
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
return buffer;}
|
561
|
+
buffer += "\n <input class='parameter' minlength='0' name='";
|
562
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
563
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
564
|
+
buffer += escapeExpression(stack1)
|
565
|
+
+ "' placeholder='' type='text' value='";
|
566
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
567
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
568
|
+
buffer += escapeExpression(stack1)
|
569
|
+
+ "'/>\n ";
|
570
|
+
return buffer;
|
571
|
+
}
|
610
572
|
|
611
573
|
function program12(depth0,data) {
|
612
|
-
|
574
|
+
|
613
575
|
var buffer = "", stack1;
|
614
|
-
buffer += "\n
|
615
|
-
|
616
|
-
stack1 =
|
617
|
-
|
618
|
-
|
619
|
-
buffer
|
620
|
-
|
576
|
+
buffer += "\n <input class='parameter' minlength='0' name='";
|
577
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
578
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
579
|
+
buffer += escapeExpression(stack1)
|
580
|
+
+ "' placeholder='' type='text' value=''/>\n ";
|
581
|
+
return buffer;
|
582
|
+
}
|
621
583
|
|
622
584
|
buffer += "<td class='code'>";
|
623
|
-
|
624
|
-
stack1 =
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
foundHelper = helpers.isBody;
|
629
|
-
stack1 = foundHelper || depth0.isBody;
|
630
|
-
stack2 = helpers['if'];
|
631
|
-
tmp1 = self.program(1, program1, data);
|
632
|
-
tmp1.hash = {};
|
633
|
-
tmp1.fn = tmp1;
|
634
|
-
tmp1.inverse = self.program(9, program9, data);
|
635
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
585
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
586
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
587
|
+
buffer += escapeExpression(stack1)
|
588
|
+
+ "</td>\n<td>\n\n ";
|
589
|
+
stack1 = helpers['if'].call(depth0, depth0.isBody, {hash:{},inverse:self.program(9, program9, data),fn:self.program(1, program1, data),data:data});
|
636
590
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
637
591
|
buffer += "\n\n</td>\n<td>";
|
638
|
-
|
639
|
-
stack1 =
|
640
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
641
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }
|
592
|
+
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
593
|
+
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
642
594
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
643
595
|
buffer += "</td>\n<td>";
|
644
|
-
|
645
|
-
stack1 =
|
646
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
647
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "paramType", { hash: {} }); }
|
596
|
+
if (stack1 = helpers.paramType) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
597
|
+
else { stack1 = depth0.paramType; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
648
598
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
649
|
-
buffer += "</td>\n<td>\n
|
650
|
-
return buffer;
|
599
|
+
buffer += "</td>\n<td>\n <span class=\"model-signature\"></span>\n</td>\n";
|
600
|
+
return buffer;
|
601
|
+
});
|
651
602
|
})();
|
652
603
|
|
653
604
|
(function() {
|
654
605
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
655
606
|
templates['param_list'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
656
|
-
|
657
|
-
|
607
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
608
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
609
|
+
var buffer = "", stack1, stack2, self=this, functionType="function", escapeExpression=this.escapeExpression;
|
658
610
|
|
659
611
|
function program1(depth0,data) {
|
660
|
-
|
661
|
-
|
662
|
-
return "
|
612
|
+
|
613
|
+
|
614
|
+
return " multiple='multiple'";
|
615
|
+
}
|
663
616
|
|
664
617
|
function program3(depth0,data) {
|
665
|
-
|
666
|
-
var buffer = "", stack1, stack2;
|
667
|
-
buffer += "\n ";
|
668
|
-
foundHelper = helpers.defaultValue;
|
669
|
-
stack1 = foundHelper || depth0.defaultValue;
|
670
|
-
stack2 = helpers['if'];
|
671
|
-
tmp1 = self.program(4, program4, data);
|
672
|
-
tmp1.hash = {};
|
673
|
-
tmp1.fn = tmp1;
|
674
|
-
tmp1.inverse = self.program(6, program6, data);
|
675
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
676
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
677
|
-
buffer += "\n ";
|
678
|
-
return buffer;}
|
679
|
-
function program4(depth0,data) {
|
680
|
-
|
681
|
-
|
682
|
-
return "\n ";}
|
683
618
|
|
619
|
+
|
620
|
+
return "\n ";
|
621
|
+
}
|
622
|
+
|
623
|
+
function program5(depth0,data) {
|
624
|
+
|
625
|
+
var buffer = "", stack1;
|
626
|
+
buffer += "\n ";
|
627
|
+
stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(8, program8, data),fn:self.program(6, program6, data),data:data});
|
628
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
629
|
+
buffer += "\n ";
|
630
|
+
return buffer;
|
631
|
+
}
|
684
632
|
function program6(depth0,data) {
|
685
|
-
|
686
|
-
|
687
|
-
return "\n
|
633
|
+
|
634
|
+
|
635
|
+
return "\n ";
|
636
|
+
}
|
688
637
|
|
689
638
|
function program8(depth0,data) {
|
690
|
-
|
691
|
-
var buffer = "", stack1
|
692
|
-
buffer += "\n ";
|
693
|
-
foundHelper = helpers.isDefault;
|
694
|
-
stack1 = foundHelper || depth0.isDefault;
|
695
|
-
stack2 = helpers['if'];
|
696
|
-
tmp1 = self.program(9, program9, data);
|
697
|
-
tmp1.hash = {};
|
698
|
-
tmp1.fn = tmp1;
|
699
|
-
tmp1.inverse = self.program(11, program11, data);
|
700
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
701
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
639
|
+
|
640
|
+
var buffer = "", stack1;
|
702
641
|
buffer += "\n ";
|
703
|
-
|
642
|
+
stack1 = helpers['if'].call(depth0, depth0.allowMultiple, {hash:{},inverse:self.program(11, program11, data),fn:self.program(9, program9, data),data:data});
|
643
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
644
|
+
buffer += "\n ";
|
645
|
+
return buffer;
|
646
|
+
}
|
704
647
|
function program9(depth0,data) {
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
stack1 = foundHelper || depth0.value;
|
710
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
711
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "value", { hash: {} }); }
|
712
|
-
buffer += escapeExpression(stack1) + "'>";
|
713
|
-
foundHelper = helpers.value;
|
714
|
-
stack1 = foundHelper || depth0.value;
|
715
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
716
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "value", { hash: {} }); }
|
717
|
-
buffer += escapeExpression(stack1) + " (default)</option>\n ";
|
718
|
-
return buffer;}
|
648
|
+
|
649
|
+
|
650
|
+
return "\n ";
|
651
|
+
}
|
719
652
|
|
720
653
|
function program11(depth0,data) {
|
721
|
-
|
654
|
+
|
655
|
+
|
656
|
+
return "\n <option selected=\"\" value=''></option>\n ";
|
657
|
+
}
|
658
|
+
|
659
|
+
function program13(depth0,data) {
|
660
|
+
|
661
|
+
var buffer = "", stack1;
|
662
|
+
buffer += "\n ";
|
663
|
+
stack1 = helpers['if'].call(depth0, depth0.isDefault, {hash:{},inverse:self.program(16, program16, data),fn:self.program(14, program14, data),data:data});
|
664
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
665
|
+
buffer += "\n ";
|
666
|
+
return buffer;
|
667
|
+
}
|
668
|
+
function program14(depth0,data) {
|
669
|
+
|
722
670
|
var buffer = "", stack1;
|
723
|
-
buffer += "\n
|
724
|
-
|
725
|
-
stack1 =
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
671
|
+
buffer += "\n <option selected=\"\" value='";
|
672
|
+
if (stack1 = helpers.value) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
673
|
+
else { stack1 = depth0.value; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
674
|
+
buffer += escapeExpression(stack1)
|
675
|
+
+ "'>";
|
676
|
+
if (stack1 = helpers.value) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
677
|
+
else { stack1 = depth0.value; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
678
|
+
buffer += escapeExpression(stack1)
|
679
|
+
+ " (default)</option>\n ";
|
680
|
+
return buffer;
|
681
|
+
}
|
682
|
+
|
683
|
+
function program16(depth0,data) {
|
684
|
+
|
685
|
+
var buffer = "", stack1;
|
686
|
+
buffer += "\n <option value='";
|
687
|
+
if (stack1 = helpers.value) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
688
|
+
else { stack1 = depth0.value; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
689
|
+
buffer += escapeExpression(stack1)
|
690
|
+
+ "'>";
|
691
|
+
if (stack1 = helpers.value) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
692
|
+
else { stack1 = depth0.value; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
693
|
+
buffer += escapeExpression(stack1)
|
694
|
+
+ "</option>\n ";
|
695
|
+
return buffer;
|
696
|
+
}
|
735
697
|
|
736
698
|
buffer += "<td class='code'>";
|
737
|
-
|
738
|
-
stack1 =
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
foundHelper = helpers.name;
|
743
|
-
stack1 = foundHelper || depth0.name;
|
744
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
745
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
|
746
|
-
buffer += escapeExpression(stack1) + "'>\n ";
|
747
|
-
foundHelper = helpers.required;
|
748
|
-
stack1 = foundHelper || depth0.required;
|
749
|
-
stack2 = helpers['if'];
|
750
|
-
tmp1 = self.program(1, program1, data);
|
751
|
-
tmp1.hash = {};
|
752
|
-
tmp1.fn = tmp1;
|
753
|
-
tmp1.inverse = self.program(3, program3, data);
|
754
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
755
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
756
|
-
buffer += "\n ";
|
757
|
-
foundHelper = helpers.allowableValues;
|
758
|
-
stack1 = foundHelper || depth0.allowableValues;
|
759
|
-
stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.descriptiveValues);
|
760
|
-
stack2 = helpers.each;
|
761
|
-
tmp1 = self.program(8, program8, data);
|
762
|
-
tmp1.hash = {};
|
763
|
-
tmp1.fn = tmp1;
|
764
|
-
tmp1.inverse = self.noop;
|
765
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
699
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
700
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
701
|
+
buffer += escapeExpression(stack1)
|
702
|
+
+ "</td>\n<td>\n <select ";
|
703
|
+
stack1 = helpers['if'].call(depth0, depth0.allowMultiple, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
766
704
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
767
|
-
buffer += "
|
768
|
-
|
769
|
-
stack1 =
|
770
|
-
|
771
|
-
|
705
|
+
buffer += " class='parameter' name='";
|
706
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
707
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
708
|
+
buffer += escapeExpression(stack1)
|
709
|
+
+ "'>\n ";
|
710
|
+
stack1 = helpers['if'].call(depth0, depth0.required, {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data});
|
772
711
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
712
|
+
buffer += "\n ";
|
713
|
+
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});
|
714
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
715
|
+
buffer += "\n </select>\n</td>\n<td>";
|
716
|
+
if (stack2 = helpers.description) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
|
717
|
+
else { stack2 = depth0.description; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
|
718
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
773
719
|
buffer += "</td>\n<td>";
|
774
|
-
|
775
|
-
|
776
|
-
if(
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
return buffer;});
|
720
|
+
if (stack2 = helpers.paramType) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
|
721
|
+
else { stack2 = depth0.paramType; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
|
722
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
723
|
+
buffer += "</td>\n<td><span class=\"model-signature\"></span></td>";
|
724
|
+
return buffer;
|
725
|
+
});
|
781
726
|
})();
|
782
727
|
|
783
728
|
(function() {
|
784
729
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
785
730
|
templates['param_readonly'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
786
|
-
|
787
|
-
|
731
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
732
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
733
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
788
734
|
|
789
735
|
function program1(depth0,data) {
|
790
|
-
|
736
|
+
|
791
737
|
var buffer = "", stack1;
|
792
738
|
buffer += "\n <textarea class='body-textarea' readonly='readonly' name='";
|
793
|
-
|
794
|
-
stack1 =
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
return buffer;}
|
739
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
740
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
741
|
+
buffer += escapeExpression(stack1)
|
742
|
+
+ "'>";
|
743
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
744
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
745
|
+
buffer += escapeExpression(stack1)
|
746
|
+
+ "</textarea>\n ";
|
747
|
+
return buffer;
|
748
|
+
}
|
804
749
|
|
805
750
|
function program3(depth0,data) {
|
806
|
-
|
807
|
-
var buffer = "", stack1
|
751
|
+
|
752
|
+
var buffer = "", stack1;
|
808
753
|
buffer += "\n ";
|
809
|
-
|
810
|
-
stack1 = foundHelper || depth0.defaultValue;
|
811
|
-
stack2 = helpers['if'];
|
812
|
-
tmp1 = self.program(4, program4, data);
|
813
|
-
tmp1.hash = {};
|
814
|
-
tmp1.fn = tmp1;
|
815
|
-
tmp1.inverse = self.program(6, program6, data);
|
816
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
754
|
+
stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(6, program6, data),fn:self.program(4, program4, data),data:data});
|
817
755
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
818
756
|
buffer += "\n ";
|
819
|
-
return buffer;
|
757
|
+
return buffer;
|
758
|
+
}
|
820
759
|
function program4(depth0,data) {
|
821
|
-
|
760
|
+
|
822
761
|
var buffer = "", stack1;
|
823
762
|
buffer += "\n ";
|
824
|
-
|
825
|
-
stack1 =
|
826
|
-
|
827
|
-
|
828
|
-
buffer
|
829
|
-
|
763
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
764
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
765
|
+
buffer += escapeExpression(stack1)
|
766
|
+
+ "\n ";
|
767
|
+
return buffer;
|
768
|
+
}
|
830
769
|
|
831
770
|
function program6(depth0,data) {
|
832
|
-
|
833
|
-
|
834
|
-
return "\n (empty)\n ";
|
771
|
+
|
772
|
+
|
773
|
+
return "\n (empty)\n ";
|
774
|
+
}
|
835
775
|
|
836
776
|
buffer += "<td class='code'>";
|
837
|
-
|
838
|
-
stack1 =
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
foundHelper = helpers.isBody;
|
843
|
-
stack1 = foundHelper || depth0.isBody;
|
844
|
-
stack2 = helpers['if'];
|
845
|
-
tmp1 = self.program(1, program1, data);
|
846
|
-
tmp1.hash = {};
|
847
|
-
tmp1.fn = tmp1;
|
848
|
-
tmp1.inverse = self.program(3, program3, data);
|
849
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
777
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
778
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
779
|
+
buffer += escapeExpression(stack1)
|
780
|
+
+ "</td>\n<td>\n ";
|
781
|
+
stack1 = helpers['if'].call(depth0, depth0.isBody, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data),data:data});
|
850
782
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
851
783
|
buffer += "\n</td>\n<td>";
|
852
|
-
|
853
|
-
stack1 =
|
854
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
855
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }
|
784
|
+
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
785
|
+
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
856
786
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
857
787
|
buffer += "</td>\n<td>";
|
858
|
-
|
859
|
-
stack1 =
|
860
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
861
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "paramType", { hash: {} }); }
|
788
|
+
if (stack1 = helpers.paramType) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
789
|
+
else { stack1 = depth0.paramType; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
862
790
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
863
791
|
buffer += "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
864
|
-
return buffer;
|
792
|
+
return buffer;
|
793
|
+
});
|
865
794
|
})();
|
866
795
|
|
867
796
|
(function() {
|
868
797
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
869
798
|
templates['param_readonly_required'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
870
|
-
|
871
|
-
|
799
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
800
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
801
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
872
802
|
|
873
803
|
function program1(depth0,data) {
|
874
|
-
|
804
|
+
|
875
805
|
var buffer = "", stack1;
|
876
806
|
buffer += "\n <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='";
|
877
|
-
|
878
|
-
stack1 =
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
return buffer;}
|
807
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
808
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
809
|
+
buffer += escapeExpression(stack1)
|
810
|
+
+ "'>";
|
811
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
812
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
813
|
+
buffer += escapeExpression(stack1)
|
814
|
+
+ "</textarea>\n ";
|
815
|
+
return buffer;
|
816
|
+
}
|
888
817
|
|
889
818
|
function program3(depth0,data) {
|
890
|
-
|
891
|
-
var buffer = "", stack1
|
819
|
+
|
820
|
+
var buffer = "", stack1;
|
892
821
|
buffer += "\n ";
|
893
|
-
|
894
|
-
stack1 = foundHelper || depth0.defaultValue;
|
895
|
-
stack2 = helpers['if'];
|
896
|
-
tmp1 = self.program(4, program4, data);
|
897
|
-
tmp1.hash = {};
|
898
|
-
tmp1.fn = tmp1;
|
899
|
-
tmp1.inverse = self.program(6, program6, data);
|
900
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
822
|
+
stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(6, program6, data),fn:self.program(4, program4, data),data:data});
|
901
823
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
902
824
|
buffer += "\n ";
|
903
|
-
return buffer;
|
825
|
+
return buffer;
|
826
|
+
}
|
904
827
|
function program4(depth0,data) {
|
905
|
-
|
828
|
+
|
906
829
|
var buffer = "", stack1;
|
907
830
|
buffer += "\n ";
|
908
|
-
|
909
|
-
stack1 =
|
910
|
-
|
911
|
-
|
912
|
-
buffer
|
913
|
-
|
831
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
832
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
833
|
+
buffer += escapeExpression(stack1)
|
834
|
+
+ "\n ";
|
835
|
+
return buffer;
|
836
|
+
}
|
914
837
|
|
915
838
|
function program6(depth0,data) {
|
916
|
-
|
917
|
-
|
918
|
-
return "\n (empty)\n ";
|
839
|
+
|
840
|
+
|
841
|
+
return "\n (empty)\n ";
|
842
|
+
}
|
919
843
|
|
920
844
|
buffer += "<td class='code required'>";
|
921
|
-
|
922
|
-
stack1 =
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
foundHelper = helpers.isBody;
|
927
|
-
stack1 = foundHelper || depth0.isBody;
|
928
|
-
stack2 = helpers['if'];
|
929
|
-
tmp1 = self.program(1, program1, data);
|
930
|
-
tmp1.hash = {};
|
931
|
-
tmp1.fn = tmp1;
|
932
|
-
tmp1.inverse = self.program(3, program3, data);
|
933
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
845
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
846
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
847
|
+
buffer += escapeExpression(stack1)
|
848
|
+
+ "</td>\n<td>\n ";
|
849
|
+
stack1 = helpers['if'].call(depth0, depth0.isBody, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data),data:data});
|
934
850
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
935
851
|
buffer += "\n</td>\n<td>";
|
936
|
-
|
937
|
-
stack1 =
|
938
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
939
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }
|
852
|
+
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
853
|
+
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
940
854
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
941
855
|
buffer += "</td>\n<td>";
|
942
|
-
|
943
|
-
stack1 =
|
944
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
945
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "paramType", { hash: {} }); }
|
856
|
+
if (stack1 = helpers.paramType) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
857
|
+
else { stack1 = depth0.paramType; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
946
858
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
947
859
|
buffer += "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
948
|
-
return buffer;
|
860
|
+
return buffer;
|
861
|
+
});
|
949
862
|
})();
|
950
863
|
|
951
864
|
(function() {
|
952
865
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
953
866
|
templates['param_required'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
954
|
-
|
955
|
-
|
867
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
868
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
869
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
956
870
|
|
957
871
|
function program1(depth0,data) {
|
958
|
-
|
959
|
-
var buffer = "", stack1
|
960
|
-
buffer += "\n
|
961
|
-
|
962
|
-
stack1 = foundHelper || depth0.isFile;
|
963
|
-
stack2 = helpers['if'];
|
964
|
-
tmp1 = self.program(2, program2, data);
|
965
|
-
tmp1.hash = {};
|
966
|
-
tmp1.fn = tmp1;
|
967
|
-
tmp1.inverse = self.program(4, program4, data);
|
968
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
872
|
+
|
873
|
+
var buffer = "", stack1;
|
874
|
+
buffer += "\n ";
|
875
|
+
stack1 = helpers['if'].call(depth0, depth0.isFile, {hash:{},inverse:self.program(4, program4, data),fn:self.program(2, program2, data),data:data});
|
969
876
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
970
|
-
buffer += "\n
|
971
|
-
return buffer;
|
877
|
+
buffer += "\n ";
|
878
|
+
return buffer;
|
879
|
+
}
|
972
880
|
function program2(depth0,data) {
|
973
|
-
|
881
|
+
|
974
882
|
var buffer = "", stack1;
|
975
|
-
buffer += "\n
|
976
|
-
|
977
|
-
stack1 =
|
978
|
-
|
979
|
-
|
980
|
-
buffer
|
981
|
-
|
883
|
+
buffer += "\n <input type=\"file\" name='";
|
884
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
885
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
886
|
+
buffer += escapeExpression(stack1)
|
887
|
+
+ "'/>\n ";
|
888
|
+
return buffer;
|
889
|
+
}
|
982
890
|
|
983
891
|
function program4(depth0,data) {
|
984
|
-
|
985
|
-
var buffer = "", stack1
|
986
|
-
buffer += "\n
|
987
|
-
|
988
|
-
stack1 = foundHelper || depth0.defaultValue;
|
989
|
-
stack2 = helpers['if'];
|
990
|
-
tmp1 = self.program(5, program5, data);
|
991
|
-
tmp1.hash = {};
|
992
|
-
tmp1.fn = tmp1;
|
993
|
-
tmp1.inverse = self.program(7, program7, data);
|
994
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
892
|
+
|
893
|
+
var buffer = "", stack1;
|
894
|
+
buffer += "\n ";
|
895
|
+
stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data});
|
995
896
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
996
|
-
buffer += "\n
|
997
|
-
return buffer;
|
897
|
+
buffer += "\n ";
|
898
|
+
return buffer;
|
899
|
+
}
|
998
900
|
function program5(depth0,data) {
|
999
|
-
|
901
|
+
|
1000
902
|
var buffer = "", stack1;
|
1001
|
-
buffer += "\n
|
1002
|
-
|
1003
|
-
stack1 =
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
return buffer;}
|
903
|
+
buffer += "\n <textarea class='body-textarea' placeholder='(required)' name='";
|
904
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
905
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
906
|
+
buffer += escapeExpression(stack1)
|
907
|
+
+ "'>";
|
908
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
909
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
910
|
+
buffer += escapeExpression(stack1)
|
911
|
+
+ "</textarea>\n ";
|
912
|
+
return buffer;
|
913
|
+
}
|
1013
914
|
|
1014
915
|
function program7(depth0,data) {
|
1015
|
-
|
916
|
+
|
1016
917
|
var buffer = "", stack1;
|
1017
|
-
buffer += "\n
|
1018
|
-
|
1019
|
-
stack1 =
|
1020
|
-
|
1021
|
-
|
1022
|
-
buffer
|
1023
|
-
|
918
|
+
buffer += "\n <textarea class='body-textarea' placeholder='(required)' name='";
|
919
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
920
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
921
|
+
buffer += escapeExpression(stack1)
|
922
|
+
+ "'></textarea>\n <br />\n <div class=\"parameter-content-type\" />\n ";
|
923
|
+
return buffer;
|
924
|
+
}
|
1024
925
|
|
1025
926
|
function program9(depth0,data) {
|
1026
|
-
|
1027
|
-
var buffer = "", stack1
|
1028
|
-
buffer += "\n
|
1029
|
-
|
1030
|
-
stack1 = foundHelper || depth0.isFile;
|
1031
|
-
stack2 = helpers['if'];
|
1032
|
-
tmp1 = self.program(10, program10, data);
|
1033
|
-
tmp1.hash = {};
|
1034
|
-
tmp1.fn = tmp1;
|
1035
|
-
tmp1.inverse = self.program(12, program12, data);
|
1036
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
927
|
+
|
928
|
+
var buffer = "", stack1;
|
929
|
+
buffer += "\n ";
|
930
|
+
stack1 = helpers['if'].call(depth0, depth0.isFile, {hash:{},inverse:self.program(12, program12, data),fn:self.program(10, program10, data),data:data});
|
1037
931
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1038
|
-
buffer += "\n
|
1039
|
-
return buffer;
|
932
|
+
buffer += "\n ";
|
933
|
+
return buffer;
|
934
|
+
}
|
1040
935
|
function program10(depth0,data) {
|
1041
|
-
|
936
|
+
|
1042
937
|
var buffer = "", stack1;
|
1043
|
-
buffer += "\n
|
1044
|
-
|
1045
|
-
stack1 =
|
1046
|
-
|
1047
|
-
|
1048
|
-
buffer
|
1049
|
-
|
938
|
+
buffer += "\n <input class='parameter' class='required' type='file' name='";
|
939
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
940
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
941
|
+
buffer += escapeExpression(stack1)
|
942
|
+
+ "'/>\n ";
|
943
|
+
return buffer;
|
944
|
+
}
|
1050
945
|
|
1051
946
|
function program12(depth0,data) {
|
1052
|
-
|
1053
|
-
var buffer = "", stack1
|
1054
|
-
buffer += "\n
|
1055
|
-
|
1056
|
-
stack1 = foundHelper || depth0.defaultValue;
|
1057
|
-
stack2 = helpers['if'];
|
1058
|
-
tmp1 = self.program(13, program13, data);
|
1059
|
-
tmp1.hash = {};
|
1060
|
-
tmp1.fn = tmp1;
|
1061
|
-
tmp1.inverse = self.program(15, program15, data);
|
1062
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
947
|
+
|
948
|
+
var buffer = "", stack1;
|
949
|
+
buffer += "\n ";
|
950
|
+
stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(15, program15, data),fn:self.program(13, program13, data),data:data});
|
1063
951
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1064
|
-
buffer += "\n
|
1065
|
-
return buffer;
|
952
|
+
buffer += "\n ";
|
953
|
+
return buffer;
|
954
|
+
}
|
1066
955
|
function program13(depth0,data) {
|
1067
|
-
|
956
|
+
|
1068
957
|
var buffer = "", stack1;
|
1069
|
-
buffer += "\n
|
1070
|
-
|
1071
|
-
stack1 =
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
return buffer;}
|
958
|
+
buffer += "\n <input class='parameter required' minlength='1' name='";
|
959
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
960
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
961
|
+
buffer += escapeExpression(stack1)
|
962
|
+
+ "' placeholder='(required)' type='text' value='";
|
963
|
+
if (stack1 = helpers.defaultValue) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
964
|
+
else { stack1 = depth0.defaultValue; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
965
|
+
buffer += escapeExpression(stack1)
|
966
|
+
+ "'/>\n ";
|
967
|
+
return buffer;
|
968
|
+
}
|
1081
969
|
|
1082
970
|
function program15(depth0,data) {
|
1083
|
-
|
971
|
+
|
1084
972
|
var buffer = "", stack1;
|
1085
|
-
buffer += "\n
|
1086
|
-
|
1087
|
-
stack1 =
|
1088
|
-
|
1089
|
-
|
1090
|
-
buffer
|
1091
|
-
|
973
|
+
buffer += "\n <input class='parameter required' minlength='1' name='";
|
974
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
975
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
976
|
+
buffer += escapeExpression(stack1)
|
977
|
+
+ "' placeholder='(required)' type='text' value=''/>\n ";
|
978
|
+
return buffer;
|
979
|
+
}
|
1092
980
|
|
1093
981
|
buffer += "<td class='code required'>";
|
1094
|
-
|
1095
|
-
stack1 =
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
foundHelper = helpers.isBody;
|
1100
|
-
stack1 = foundHelper || depth0.isBody;
|
1101
|
-
stack2 = helpers['if'];
|
1102
|
-
tmp1 = self.program(1, program1, data);
|
1103
|
-
tmp1.hash = {};
|
1104
|
-
tmp1.fn = tmp1;
|
1105
|
-
tmp1.inverse = self.program(9, program9, data);
|
1106
|
-
stack1 = stack2.call(depth0, stack1, tmp1);
|
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
|
+
+ "</td>\n<td>\n ";
|
986
|
+
stack1 = helpers['if'].call(depth0, depth0.isBody, {hash:{},inverse:self.program(9, program9, data),fn:self.program(1, program1, data),data:data});
|
1107
987
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1108
|
-
buffer += "\n</td>\n<td>\n
|
1109
|
-
|
1110
|
-
stack1 =
|
1111
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
1112
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }
|
988
|
+
buffer += "\n</td>\n<td>\n <strong>";
|
989
|
+
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
990
|
+
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1113
991
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1114
992
|
buffer += "</strong>\n</td>\n<td>";
|
1115
|
-
|
1116
|
-
stack1 =
|
1117
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
1118
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "paramType", { hash: {} }); }
|
993
|
+
if (stack1 = helpers.paramType) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
994
|
+
else { stack1 = depth0.paramType; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1119
995
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1120
996
|
buffer += "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
1121
|
-
return buffer;
|
997
|
+
return buffer;
|
998
|
+
});
|
999
|
+
})();
|
1000
|
+
|
1001
|
+
(function() {
|
1002
|
+
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
1003
|
+
templates['parameter_content_type'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
1004
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
1005
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
1006
|
+
var buffer = "", stack1, functionType="function", self=this;
|
1007
|
+
|
1008
|
+
function program1(depth0,data) {
|
1009
|
+
|
1010
|
+
var buffer = "", stack1;
|
1011
|
+
buffer += "\n ";
|
1012
|
+
stack1 = helpers.each.call(depth0, depth0.consumes, {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data});
|
1013
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1014
|
+
buffer += "\n";
|
1015
|
+
return buffer;
|
1016
|
+
}
|
1017
|
+
function program2(depth0,data) {
|
1018
|
+
|
1019
|
+
var buffer = "", stack1;
|
1020
|
+
buffer += "\n <option value=\"";
|
1021
|
+
stack1 = (typeof depth0 === functionType ? depth0.apply(depth0) : depth0);
|
1022
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1023
|
+
buffer += "\">";
|
1024
|
+
stack1 = (typeof depth0 === functionType ? depth0.apply(depth0) : depth0);
|
1025
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1026
|
+
buffer += "</option>\n ";
|
1027
|
+
return buffer;
|
1028
|
+
}
|
1029
|
+
|
1030
|
+
function program4(depth0,data) {
|
1031
|
+
|
1032
|
+
|
1033
|
+
return "\n <option value=\"application/json\">application/json</option>\n";
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
buffer += "<label for=\"parameterContentType\"></label>\n<select name=\"parameterContentType\">\n";
|
1037
|
+
stack1 = helpers['if'].call(depth0, depth0.consumes, {hash:{},inverse:self.program(4, program4, data),fn:self.program(1, program1, data),data:data});
|
1038
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1039
|
+
buffer += "\n</select>\n";
|
1040
|
+
return buffer;
|
1041
|
+
});
|
1122
1042
|
})();
|
1123
1043
|
|
1124
1044
|
(function() {
|
1125
1045
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
1126
1046
|
templates['resource'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
stack1 =
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
stack1 =
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
stack1 =
|
1154
|
-
if(
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
if(
|
1160
|
-
else
|
1161
|
-
buffer += escapeExpression(stack1)
|
1162
|
-
|
1163
|
-
stack1 =
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
stack1 =
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
if(
|
1180
|
-
else
|
1181
|
-
buffer += escapeExpression(stack1)
|
1182
|
-
|
1047
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
1048
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
1049
|
+
var buffer = "", stack1, options, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
|
1050
|
+
|
1051
|
+
function program1(depth0,data) {
|
1052
|
+
|
1053
|
+
|
1054
|
+
return " : ";
|
1055
|
+
}
|
1056
|
+
|
1057
|
+
buffer += "<div class='heading'>\n <h2>\n <a href='#!/";
|
1058
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1059
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1060
|
+
buffer += escapeExpression(stack1)
|
1061
|
+
+ "' onclick=\"Docs.toggleEndpointListForResource('";
|
1062
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1063
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1064
|
+
buffer += escapeExpression(stack1)
|
1065
|
+
+ "');\">";
|
1066
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1067
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1068
|
+
buffer += escapeExpression(stack1)
|
1069
|
+
+ "</a> ";
|
1070
|
+
options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data};
|
1071
|
+
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, options); }
|
1072
|
+
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1073
|
+
if (!helpers.description) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
|
1074
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1075
|
+
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1076
|
+
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1077
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1078
|
+
buffer += "\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/";
|
1079
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1080
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1081
|
+
buffer += escapeExpression(stack1)
|
1082
|
+
+ "' id='endpointListTogger_";
|
1083
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1084
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1085
|
+
buffer += escapeExpression(stack1)
|
1086
|
+
+ "'\n onclick=\"Docs.toggleEndpointListForResource('";
|
1087
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1088
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1089
|
+
buffer += escapeExpression(stack1)
|
1090
|
+
+ "');\">Show/Hide</a>\n </li>\n <li>\n <a href='#' onclick=\"Docs.collapseOperationsForResource('";
|
1091
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1092
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1093
|
+
buffer += escapeExpression(stack1)
|
1094
|
+
+ "'); return false;\">\n List Operations\n </a>\n </li>\n <li>\n <a href='#' onclick=\"Docs.expandOperationsForResource('";
|
1095
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1096
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1097
|
+
buffer += escapeExpression(stack1)
|
1098
|
+
+ "'); return false;\">\n Expand Operations\n </a>\n </li>\n <li>\n <a href='";
|
1099
|
+
if (stack1 = helpers.url) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1100
|
+
else { stack1 = depth0.url; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1101
|
+
buffer += escapeExpression(stack1)
|
1102
|
+
+ "'>Raw</a>\n </li>\n </ul>\n</div>\n<ul class='endpoints' id='";
|
1103
|
+
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1104
|
+
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1105
|
+
buffer += escapeExpression(stack1)
|
1106
|
+
+ "_endpoint_list' style='display:none'>\n\n</ul>\n";
|
1107
|
+
return buffer;
|
1108
|
+
});
|
1109
|
+
})();
|
1110
|
+
|
1111
|
+
(function() {
|
1112
|
+
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
1113
|
+
templates['response_content_type'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
1114
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
1115
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
1116
|
+
var buffer = "", stack1, functionType="function", self=this;
|
1117
|
+
|
1118
|
+
function program1(depth0,data) {
|
1119
|
+
|
1120
|
+
var buffer = "", stack1;
|
1121
|
+
buffer += "\n ";
|
1122
|
+
stack1 = helpers.each.call(depth0, depth0.produces, {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data});
|
1123
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1124
|
+
buffer += "\n";
|
1125
|
+
return buffer;
|
1126
|
+
}
|
1127
|
+
function program2(depth0,data) {
|
1128
|
+
|
1129
|
+
var buffer = "", stack1;
|
1130
|
+
buffer += "\n <option value=\"";
|
1131
|
+
stack1 = (typeof depth0 === functionType ? depth0.apply(depth0) : depth0);
|
1132
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1133
|
+
buffer += "\">";
|
1134
|
+
stack1 = (typeof depth0 === functionType ? depth0.apply(depth0) : depth0);
|
1135
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1136
|
+
buffer += "</option>\n ";
|
1137
|
+
return buffer;
|
1138
|
+
}
|
1139
|
+
|
1140
|
+
function program4(depth0,data) {
|
1141
|
+
|
1142
|
+
|
1143
|
+
return "\n <option value=\"application/json\">application/json</option>\n";
|
1144
|
+
}
|
1145
|
+
|
1146
|
+
buffer += "<label for=\"responseContentType\"></label>\n<select name=\"responseContentType\">\n";
|
1147
|
+
stack1 = helpers['if'].call(depth0, depth0.produces, {hash:{},inverse:self.program(4, program4, data),fn:self.program(1, program1, data),data:data});
|
1148
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1149
|
+
buffer += "\n</select>\n";
|
1150
|
+
return buffer;
|
1151
|
+
});
|
1183
1152
|
})();
|
1184
1153
|
|
1185
1154
|
(function() {
|
1186
1155
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
1187
1156
|
templates['signature'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
1188
|
-
|
1189
|
-
|
1157
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
1158
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
1159
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression;
|
1190
1160
|
|
1191
1161
|
|
1192
1162
|
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 ";
|
1193
|
-
|
1194
|
-
stack1 =
|
1195
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
1196
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "signature", { hash: {} }); }
|
1163
|
+
if (stack1 = helpers.signature) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1164
|
+
else { stack1 = depth0.signature; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1197
1165
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1198
1166
|
buffer += "\n </div>\n\n <div class=\"snippet\">\n <pre><code>";
|
1199
|
-
|
1200
|
-
stack1 =
|
1201
|
-
|
1202
|
-
|
1203
|
-
buffer
|
1204
|
-
|
1167
|
+
if (stack1 = helpers.sampleJSON) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1168
|
+
else { stack1 = depth0.sampleJSON; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1169
|
+
buffer += escapeExpression(stack1)
|
1170
|
+
+ "</code></pre>\n <small class=\"notice\"></small>\n </div>\n</div>\n\n";
|
1171
|
+
return buffer;
|
1172
|
+
});
|
1205
1173
|
})();
|
1206
1174
|
|
1207
1175
|
(function() {
|
1208
1176
|
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
1209
1177
|
templates['status_code'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
1210
|
-
|
1211
|
-
|
1178
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
1179
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
1180
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression;
|
1212
1181
|
|
1213
1182
|
|
1214
1183
|
buffer += "<td width='15%' class='code'>";
|
1215
|
-
|
1216
|
-
stack1 =
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
stack1 = foundHelper || depth0.reason;
|
1222
|
-
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
|
1223
|
-
else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "reason", { hash: {} }); }
|
1184
|
+
if (stack1 = helpers.code) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1185
|
+
else { stack1 = depth0.code; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1186
|
+
buffer += escapeExpression(stack1)
|
1187
|
+
+ "</td>\n<td>";
|
1188
|
+
if (stack1 = helpers.message) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
1189
|
+
else { stack1 = depth0.message; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
1224
1190
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
1225
|
-
buffer += "</td>\n
|
1226
|
-
return buffer;
|
1191
|
+
buffer += "</td>\n";
|
1192
|
+
return buffer;
|
1193
|
+
});
|
1227
1194
|
})();
|
1228
1195
|
|
1229
1196
|
|
1230
1197
|
|
1231
|
-
// Generated by CoffeeScript 1.
|
1198
|
+
// Generated by CoffeeScript 1.6.3
|
1232
1199
|
(function() {
|
1233
|
-
var ContentTypeView, HeaderView, MainView, OperationView, ParameterView, ResourceView, SignatureView, StatusCodeView, SwaggerUi,
|
1200
|
+
var ContentTypeView, HeaderView, MainView, OperationView, ParameterContentTypeView, ParameterView, ResourceView, ResponseContentTypeView, SignatureView, StatusCodeView, SwaggerUi, _ref, _ref1, _ref10, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9,
|
1234
1201
|
__hasProp = {}.hasOwnProperty,
|
1235
1202
|
__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; };
|
1236
1203
|
|
1237
1204
|
SwaggerUi = (function(_super) {
|
1238
|
-
|
1239
1205
|
__extends(SwaggerUi, _super);
|
1240
1206
|
|
1241
1207
|
function SwaggerUi() {
|
1242
|
-
|
1208
|
+
_ref = SwaggerUi.__super__.constructor.apply(this, arguments);
|
1209
|
+
return _ref;
|
1243
1210
|
}
|
1244
1211
|
|
1245
1212
|
SwaggerUi.prototype.dom_id = "swagger_ui";
|
@@ -1261,7 +1228,7 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1261
1228
|
this.dom_id = options.dom_id;
|
1262
1229
|
delete options.dom_id;
|
1263
1230
|
}
|
1264
|
-
if (
|
1231
|
+
if ($('#' + this.dom_id) == null) {
|
1265
1232
|
$('body').append('<div id="' + this.dom_id + '"></div>');
|
1266
1233
|
}
|
1267
1234
|
this.options = options;
|
@@ -1283,18 +1250,24 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1283
1250
|
};
|
1284
1251
|
|
1285
1252
|
SwaggerUi.prototype.updateSwaggerUi = function(data) {
|
1286
|
-
this.options.
|
1287
|
-
this.options.apiKey = data.apiKey;
|
1253
|
+
this.options.url = data.url;
|
1288
1254
|
return this.load();
|
1289
1255
|
};
|
1290
1256
|
|
1291
1257
|
SwaggerUi.prototype.load = function() {
|
1292
|
-
var
|
1293
|
-
if ((
|
1294
|
-
|
1258
|
+
var url, _ref1;
|
1259
|
+
if ((_ref1 = this.mainView) != null) {
|
1260
|
+
_ref1.clear();
|
1295
1261
|
}
|
1296
|
-
|
1297
|
-
|
1262
|
+
url = this.options.url;
|
1263
|
+
if (url.indexOf("http") !== 0) {
|
1264
|
+
url = this.buildUrl(window.location.href.toString(), url);
|
1265
|
+
}
|
1266
|
+
this.options.url = url;
|
1267
|
+
this.headerView.update(url);
|
1268
|
+
this.api = new SwaggerApi(this.options);
|
1269
|
+
this.api.build();
|
1270
|
+
return this.api;
|
1298
1271
|
};
|
1299
1272
|
|
1300
1273
|
SwaggerUi.prototype.render = function() {
|
@@ -1320,6 +1293,18 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1320
1293
|
}, 400);
|
1321
1294
|
};
|
1322
1295
|
|
1296
|
+
SwaggerUi.prototype.buildUrl = function(base, url) {
|
1297
|
+
var parts;
|
1298
|
+
log("base is " + base);
|
1299
|
+
parts = base.split("/");
|
1300
|
+
base = parts[0] + "//" + parts[2];
|
1301
|
+
if (url.indexOf("/") === 0) {
|
1302
|
+
return base + url;
|
1303
|
+
} else {
|
1304
|
+
return base + "/" + url;
|
1305
|
+
}
|
1306
|
+
};
|
1307
|
+
|
1323
1308
|
SwaggerUi.prototype.showMessage = function(data) {
|
1324
1309
|
if (data == null) {
|
1325
1310
|
data = '';
|
@@ -1350,11 +1335,11 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1350
1335
|
window.SwaggerUi = SwaggerUi;
|
1351
1336
|
|
1352
1337
|
HeaderView = (function(_super) {
|
1353
|
-
|
1354
1338
|
__extends(HeaderView, _super);
|
1355
1339
|
|
1356
1340
|
function HeaderView() {
|
1357
|
-
|
1341
|
+
_ref1 = HeaderView.__super__.constructor.apply(this, arguments);
|
1342
|
+
return _ref1;
|
1358
1343
|
}
|
1359
1344
|
|
1360
1345
|
HeaderView.prototype.events = {
|
@@ -1369,15 +1354,13 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1369
1354
|
|
1370
1355
|
HeaderView.prototype.showPetStore = function(e) {
|
1371
1356
|
return this.trigger('update-swagger-ui', {
|
1372
|
-
|
1373
|
-
apiKey: "special-key"
|
1357
|
+
url: "http://petstore.swagger.wordnik.com/api/api-docs"
|
1374
1358
|
});
|
1375
1359
|
};
|
1376
1360
|
|
1377
1361
|
HeaderView.prototype.showWordnikDev = function(e) {
|
1378
1362
|
return this.trigger('update-swagger-ui', {
|
1379
|
-
|
1380
|
-
apiKey: ""
|
1363
|
+
url: "http://api.wordnik.com/v4/resources.json"
|
1381
1364
|
});
|
1382
1365
|
};
|
1383
1366
|
|
@@ -1392,7 +1375,7 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1392
1375
|
e.preventDefault();
|
1393
1376
|
}
|
1394
1377
|
return this.trigger('update-swagger-ui', {
|
1395
|
-
|
1378
|
+
url: $('#input_baseUrl').val(),
|
1396
1379
|
apiKey: $('#input_apiKey').val()
|
1397
1380
|
});
|
1398
1381
|
};
|
@@ -1402,11 +1385,9 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1402
1385
|
trigger = false;
|
1403
1386
|
}
|
1404
1387
|
$('#input_baseUrl').val(url);
|
1405
|
-
$('#input_apiKey').val(apiKey);
|
1406
1388
|
if (trigger) {
|
1407
1389
|
return this.trigger('update-swagger-ui', {
|
1408
|
-
|
1409
|
-
apiKey: apiKey
|
1390
|
+
url: url
|
1410
1391
|
});
|
1411
1392
|
}
|
1412
1393
|
};
|
@@ -1416,21 +1397,21 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1416
1397
|
})(Backbone.View);
|
1417
1398
|
|
1418
1399
|
MainView = (function(_super) {
|
1419
|
-
|
1420
1400
|
__extends(MainView, _super);
|
1421
1401
|
|
1422
1402
|
function MainView() {
|
1423
|
-
|
1403
|
+
_ref2 = MainView.__super__.constructor.apply(this, arguments);
|
1404
|
+
return _ref2;
|
1424
1405
|
}
|
1425
1406
|
|
1426
1407
|
MainView.prototype.initialize = function() {};
|
1427
1408
|
|
1428
1409
|
MainView.prototype.render = function() {
|
1429
|
-
var resource, _i, _len,
|
1410
|
+
var resource, _i, _len, _ref3;
|
1430
1411
|
$(this.el).html(Handlebars.templates.main(this.model));
|
1431
|
-
|
1432
|
-
for (_i = 0, _len =
|
1433
|
-
resource =
|
1412
|
+
_ref3 = this.model.apisArray;
|
1413
|
+
for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
|
1414
|
+
resource = _ref3[_i];
|
1434
1415
|
this.addResource(resource);
|
1435
1416
|
}
|
1436
1417
|
return this;
|
@@ -1456,22 +1437,22 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1456
1437
|
})(Backbone.View);
|
1457
1438
|
|
1458
1439
|
ResourceView = (function(_super) {
|
1459
|
-
|
1460
1440
|
__extends(ResourceView, _super);
|
1461
1441
|
|
1462
1442
|
function ResourceView() {
|
1463
|
-
|
1443
|
+
_ref3 = ResourceView.__super__.constructor.apply(this, arguments);
|
1444
|
+
return _ref3;
|
1464
1445
|
}
|
1465
1446
|
|
1466
1447
|
ResourceView.prototype.initialize = function() {};
|
1467
1448
|
|
1468
1449
|
ResourceView.prototype.render = function() {
|
1469
|
-
var operation, _i, _len,
|
1450
|
+
var operation, _i, _len, _ref4;
|
1470
1451
|
$(this.el).html(Handlebars.templates.resource(this.model));
|
1471
1452
|
this.number = 0;
|
1472
|
-
|
1473
|
-
for (_i = 0, _len =
|
1474
|
-
operation =
|
1453
|
+
_ref4 = this.model.operationsArray;
|
1454
|
+
for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
|
1455
|
+
operation = _ref4[_i];
|
1475
1456
|
this.addOperation(operation);
|
1476
1457
|
}
|
1477
1458
|
return this;
|
@@ -1494,13 +1475,15 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1494
1475
|
})(Backbone.View);
|
1495
1476
|
|
1496
1477
|
OperationView = (function(_super) {
|
1497
|
-
|
1498
1478
|
__extends(OperationView, _super);
|
1499
1479
|
|
1500
1480
|
function OperationView() {
|
1501
|
-
|
1481
|
+
_ref4 = OperationView.__super__.constructor.apply(this, arguments);
|
1482
|
+
return _ref4;
|
1502
1483
|
}
|
1503
1484
|
|
1485
|
+
OperationView.prototype.invocationUrl = null;
|
1486
|
+
|
1504
1487
|
OperationView.prototype.events = {
|
1505
1488
|
'submit .sandbox': 'submitOperation',
|
1506
1489
|
'click .submit': 'submitOperation',
|
@@ -1511,8 +1494,8 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1511
1494
|
OperationView.prototype.initialize = function() {};
|
1512
1495
|
|
1513
1496
|
OperationView.prototype.render = function() {
|
1514
|
-
var contentTypeModel,
|
1515
|
-
isMethodSubmissionSupported =
|
1497
|
+
var contentTypeModel, isMethodSubmissionSupported, param, responseContentTypeView, responseSignatureView, signatureModel, statusCode, type, _i, _j, _k, _len, _len1, _len2, _ref5, _ref6, _ref7;
|
1498
|
+
isMethodSubmissionSupported = true;
|
1516
1499
|
if (!isMethodSubmissionSupported) {
|
1517
1500
|
this.model.isReadOnly = true;
|
1518
1501
|
}
|
@@ -1529,36 +1512,44 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1529
1512
|
});
|
1530
1513
|
$('.model-signature', $(this.el)).append(responseSignatureView.render().el);
|
1531
1514
|
} else {
|
1532
|
-
$('.model-signature', $(this.el)).html(this.model.
|
1515
|
+
$('.model-signature', $(this.el)).html(this.model.type);
|
1533
1516
|
}
|
1534
1517
|
contentTypeModel = {
|
1535
1518
|
isParam: false
|
1536
1519
|
};
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1520
|
+
contentTypeModel.consumes = this.model.consumes;
|
1521
|
+
contentTypeModel.produces = this.model.produces;
|
1522
|
+
_ref5 = this.model.parameters;
|
1523
|
+
for (_i = 0, _len = _ref5.length; _i < _len; _i++) {
|
1524
|
+
param = _ref5[_i];
|
1525
|
+
type = param.type || param.dataType;
|
1526
|
+
if (type.toLowerCase() === 'file') {
|
1527
|
+
if (!contentTypeModel.consumes) {
|
1528
|
+
log("set content type ");
|
1529
|
+
contentTypeModel.consumes = 'multipart/form-data';
|
1530
|
+
}
|
1531
|
+
}
|
1542
1532
|
}
|
1543
|
-
|
1533
|
+
responseContentTypeView = new ResponseContentTypeView({
|
1544
1534
|
model: contentTypeModel
|
1545
1535
|
});
|
1546
|
-
$('.content-type', $(this.el)).append(
|
1547
|
-
|
1548
|
-
for (
|
1549
|
-
param =
|
1550
|
-
this.addParameter(param);
|
1536
|
+
$('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);
|
1537
|
+
_ref6 = this.model.parameters;
|
1538
|
+
for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) {
|
1539
|
+
param = _ref6[_j];
|
1540
|
+
this.addParameter(param, contentTypeModel.consumes);
|
1551
1541
|
}
|
1552
|
-
|
1553
|
-
for (
|
1554
|
-
statusCode =
|
1542
|
+
_ref7 = this.model.responseMessages;
|
1543
|
+
for (_k = 0, _len2 = _ref7.length; _k < _len2; _k++) {
|
1544
|
+
statusCode = _ref7[_k];
|
1555
1545
|
this.addStatusCode(statusCode);
|
1556
1546
|
}
|
1557
1547
|
return this;
|
1558
1548
|
};
|
1559
1549
|
|
1560
|
-
OperationView.prototype.addParameter = function(param) {
|
1550
|
+
OperationView.prototype.addParameter = function(param, consumes) {
|
1561
1551
|
var paramView;
|
1552
|
+
param.consumes = consumes;
|
1562
1553
|
paramView = new ParameterView({
|
1563
1554
|
model: param,
|
1564
1555
|
tagName: 'tr',
|
@@ -1577,8 +1568,7 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1577
1568
|
};
|
1578
1569
|
|
1579
1570
|
OperationView.prototype.submitOperation = function(e) {
|
1580
|
-
var
|
1581
|
-
_this = this;
|
1571
|
+
var error_free, form, isFileUpload, map, o, opts, val, _i, _j, _k, _len, _len1, _len2, _ref5, _ref6, _ref7;
|
1582
1572
|
if (e != null) {
|
1583
1573
|
e.preventDefault();
|
1584
1574
|
}
|
@@ -1599,105 +1589,146 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1599
1589
|
});
|
1600
1590
|
if (error_free) {
|
1601
1591
|
map = {};
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1592
|
+
opts = {
|
1593
|
+
parent: this
|
1594
|
+
};
|
1595
|
+
isFileUpload = false;
|
1596
|
+
_ref5 = form.find("input");
|
1597
|
+
for (_i = 0, _len = _ref5.length; _i < _len; _i++) {
|
1598
|
+
o = _ref5[_i];
|
1605
1599
|
if ((o.value != null) && jQuery.trim(o.value).length > 0) {
|
1606
1600
|
map[o.name] = o.value;
|
1607
1601
|
}
|
1602
|
+
if (o.type === "file") {
|
1603
|
+
isFileUpload = true;
|
1604
|
+
}
|
1608
1605
|
}
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
} else {
|
1615
|
-
_ref1 = this.model.parameters;
|
1616
|
-
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
1617
|
-
o = _ref1[_j];
|
1618
|
-
if (o.paramType === 'form') {
|
1619
|
-
isFormPost = true;
|
1620
|
-
consumes = false;
|
1621
|
-
}
|
1606
|
+
_ref6 = form.find("textarea");
|
1607
|
+
for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) {
|
1608
|
+
o = _ref6[_j];
|
1609
|
+
if ((o.value != null) && jQuery.trim(o.value).length > 0) {
|
1610
|
+
map["body"] = o.value;
|
1622
1611
|
}
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1612
|
+
}
|
1613
|
+
_ref7 = form.find("select");
|
1614
|
+
for (_k = 0, _len2 = _ref7.length; _k < _len2; _k++) {
|
1615
|
+
o = _ref7[_k];
|
1616
|
+
val = this.getSelectedValue(o);
|
1617
|
+
if ((val != null) && jQuery.trim(val).length > 0) {
|
1618
|
+
map[o.name] = val;
|
1627
1619
|
}
|
1628
1620
|
}
|
1621
|
+
opts.responseContentType = $("div select[name=responseContentType]", $(this.el)).val();
|
1622
|
+
opts.requestContentType = $("div select[name=parameterContentType]", $(this.el)).val();
|
1623
|
+
$(".response_throbber", $(this.el)).show();
|
1629
1624
|
if (isFileUpload) {
|
1630
|
-
|
1631
|
-
_ref2 = this.model.parameters;
|
1632
|
-
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
|
1633
|
-
param = _ref2[_k];
|
1634
|
-
if ((param.paramType === 'body' || 'form') && param.name !== 'file' && param.name !== 'File' && (map[param.name] != null)) {
|
1635
|
-
bodyParam.append(param.name, map[param.name]);
|
1636
|
-
}
|
1637
|
-
}
|
1638
|
-
$.each(form.children().find('input[type~="file"]'), function(i, el) {
|
1639
|
-
return bodyParam.append($(el).attr('name'), el.files[0]);
|
1640
|
-
});
|
1641
|
-
console.log(bodyParam);
|
1642
|
-
} else if (isFormPost) {
|
1643
|
-
bodyParam = new FormData();
|
1644
|
-
_ref3 = this.model.parameters;
|
1645
|
-
for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {
|
1646
|
-
param = _ref3[_l];
|
1647
|
-
if (map[param.name] != null) {
|
1648
|
-
bodyParam.append(param.name, map[param.name]);
|
1649
|
-
}
|
1650
|
-
}
|
1625
|
+
return this.handleFileUpload(map, form);
|
1651
1626
|
} else {
|
1652
|
-
|
1653
|
-
_ref4 = this.model.parameters;
|
1654
|
-
for (_m = 0, _len4 = _ref4.length; _m < _len4; _m++) {
|
1655
|
-
param = _ref4[_m];
|
1656
|
-
if (param.paramType === 'body') {
|
1657
|
-
bodyParam = map[param.name];
|
1658
|
-
}
|
1659
|
-
}
|
1627
|
+
return this.model["do"](map, opts, this.showCompleteStatus, this.showErrorStatus, this);
|
1660
1628
|
}
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1671
|
-
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
|
1684
|
-
|
1685
|
-
paramContentTypeField = $("td select[name=contentType]", $(this.el)).val();
|
1686
|
-
if (paramContentTypeField) {
|
1687
|
-
obj.contentType = paramContentTypeField;
|
1629
|
+
}
|
1630
|
+
};
|
1631
|
+
|
1632
|
+
OperationView.prototype.success = function(response, parent) {
|
1633
|
+
return parent.showCompleteStatus(response);
|
1634
|
+
};
|
1635
|
+
|
1636
|
+
OperationView.prototype.handleFileUpload = function(map, form) {
|
1637
|
+
var bodyParam, el, headerParams, o, obj, param, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref5, _ref6, _ref7, _ref8,
|
1638
|
+
_this = this;
|
1639
|
+
log("it's a file upload");
|
1640
|
+
_ref5 = form.serializeArray();
|
1641
|
+
for (_i = 0, _len = _ref5.length; _i < _len; _i++) {
|
1642
|
+
o = _ref5[_i];
|
1643
|
+
if ((o.value != null) && jQuery.trim(o.value).length > 0) {
|
1644
|
+
map[o.name] = o.value;
|
1645
|
+
}
|
1646
|
+
}
|
1647
|
+
bodyParam = new FormData();
|
1648
|
+
_ref6 = this.model.parameters;
|
1649
|
+
for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) {
|
1650
|
+
param = _ref6[_j];
|
1651
|
+
if (param.paramType === 'form') {
|
1652
|
+
bodyParam.append(param.name, map[param.name]);
|
1688
1653
|
}
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1654
|
+
}
|
1655
|
+
headerParams = {};
|
1656
|
+
_ref7 = this.model.parameters;
|
1657
|
+
for (_k = 0, _len2 = _ref7.length; _k < _len2; _k++) {
|
1658
|
+
param = _ref7[_k];
|
1659
|
+
if (param.paramType === 'header') {
|
1660
|
+
headerParams[param.name] = map[param.name];
|
1692
1661
|
}
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1662
|
+
}
|
1663
|
+
log(headerParams);
|
1664
|
+
_ref8 = form.find('input[type~="file"]');
|
1665
|
+
for (_l = 0, _len3 = _ref8.length; _l < _len3; _l++) {
|
1666
|
+
el = _ref8[_l];
|
1667
|
+
bodyParam.append($(el).attr('name'), el.files[0]);
|
1668
|
+
}
|
1669
|
+
log(bodyParam);
|
1670
|
+
this.invocationUrl = this.model.supportHeaderParams() ? (headerParams = this.model.getHeaderParams(map), this.model.urlify(map, false)) : this.model.urlify(map, true);
|
1671
|
+
$(".request_url", $(this.el)).html("<pre>" + this.invocationUrl + "</pre>");
|
1672
|
+
obj = {
|
1673
|
+
type: this.model.method,
|
1674
|
+
url: this.invocationUrl,
|
1675
|
+
headers: headerParams,
|
1676
|
+
data: bodyParam,
|
1677
|
+
dataType: 'json',
|
1678
|
+
contentType: false,
|
1679
|
+
processData: false,
|
1680
|
+
error: function(data, textStatus, error) {
|
1681
|
+
return _this.showErrorStatus(_this.wrap(data), _this);
|
1682
|
+
},
|
1683
|
+
success: function(data) {
|
1684
|
+
return _this.showResponse(data, _this);
|
1685
|
+
},
|
1686
|
+
complete: function(data) {
|
1687
|
+
return _this.showCompleteStatus(_this.wrap(data), _this);
|
1688
|
+
}
|
1689
|
+
};
|
1690
|
+
if (window.authorizations) {
|
1691
|
+
window.authorizations.apply(obj);
|
1692
|
+
}
|
1693
|
+
jQuery.ajax(obj);
|
1694
|
+
return false;
|
1695
|
+
};
|
1696
|
+
|
1697
|
+
OperationView.prototype.wrap = function(data) {
|
1698
|
+
var o,
|
1699
|
+
_this = this;
|
1700
|
+
o = {};
|
1701
|
+
o.content = {};
|
1702
|
+
o.content.data = data.responseText;
|
1703
|
+
o.getHeaders = function() {
|
1704
|
+
return {
|
1705
|
+
"Content-Type": data.headers("Content-Type")
|
1706
|
+
};
|
1707
|
+
};
|
1708
|
+
o.request = {};
|
1709
|
+
o.request.url = this.invocationUrl;
|
1710
|
+
o.status = data.status;
|
1711
|
+
return o;
|
1712
|
+
};
|
1713
|
+
|
1714
|
+
OperationView.prototype.getSelectedValue = function(select) {
|
1715
|
+
var opt, options, _i, _len, _ref5;
|
1716
|
+
if (!select.multiple) {
|
1717
|
+
return select.value;
|
1718
|
+
} else {
|
1719
|
+
options = [];
|
1720
|
+
_ref5 = select.options;
|
1721
|
+
for (_i = 0, _len = _ref5.length; _i < _len; _i++) {
|
1722
|
+
opt = _ref5[_i];
|
1723
|
+
if (opt.selected) {
|
1724
|
+
options.push(opt.value);
|
1725
|
+
}
|
1726
|
+
}
|
1727
|
+
if (options.length > 0) {
|
1728
|
+
return options.join(",");
|
1729
|
+
} else {
|
1730
|
+
return null;
|
1698
1731
|
}
|
1699
|
-
jQuery.ajax(obj);
|
1700
|
-
return false;
|
1701
1732
|
}
|
1702
1733
|
};
|
1703
1734
|
|
@@ -1715,12 +1746,12 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1715
1746
|
return $(".response_body", $(this.el)).html(escape(prettyJson));
|
1716
1747
|
};
|
1717
1748
|
|
1718
|
-
OperationView.prototype.showErrorStatus = function(data) {
|
1719
|
-
return
|
1749
|
+
OperationView.prototype.showErrorStatus = function(data, parent) {
|
1750
|
+
return parent.showStatus(data);
|
1720
1751
|
};
|
1721
1752
|
|
1722
|
-
OperationView.prototype.showCompleteStatus = function(data) {
|
1723
|
-
return
|
1753
|
+
OperationView.prototype.showCompleteStatus = function(data, parent) {
|
1754
|
+
return parent.showStatus(data);
|
1724
1755
|
};
|
1725
1756
|
|
1726
1757
|
OperationView.prototype.formatXml = function(xml) {
|
@@ -1776,9 +1807,9 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1776
1807
|
padding = '';
|
1777
1808
|
indent += transitions[fromTo];
|
1778
1809
|
padding = ((function() {
|
1779
|
-
var _j,
|
1810
|
+
var _j, _ref5, _results;
|
1780
1811
|
_results = [];
|
1781
|
-
for (j = _j = 0,
|
1812
|
+
for (j = _j = 0, _ref5 = indent; 0 <= _ref5 ? _j < _ref5 : _j > _ref5; j = 0 <= _ref5 ? ++_j : --_j) {
|
1782
1813
|
_results.push(' ');
|
1783
1814
|
}
|
1784
1815
|
return _results;
|
@@ -1796,19 +1827,34 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1796
1827
|
return formatted;
|
1797
1828
|
};
|
1798
1829
|
|
1799
|
-
OperationView.prototype.showStatus = function(
|
1800
|
-
var code, pre, response_body;
|
1801
|
-
|
1802
|
-
|
1830
|
+
OperationView.prototype.showStatus = function(response) {
|
1831
|
+
var code, content, contentType, headers, pre, response_body;
|
1832
|
+
content = response.data;
|
1833
|
+
headers = response.headers;
|
1834
|
+
contentType = headers["Content-Type"] ? headers["Content-Type"].split(";")[0].trim() : null;
|
1835
|
+
if (!content) {
|
1836
|
+
code = $('<code />').text("no content");
|
1837
|
+
pre = $('<pre class="json" />').append(code);
|
1838
|
+
} else if (contentType === "application/json" || /\+json$/.test(contentType)) {
|
1839
|
+
code = $('<code />').text(JSON.stringify(JSON.parse(content), null, " "));
|
1803
1840
|
pre = $('<pre class="json" />').append(code);
|
1804
|
-
}
|
1805
|
-
code = $('<code />').text(this.formatXml(
|
1841
|
+
} else if (contentType === "application/xml" || /\+xml$/.test(contentType)) {
|
1842
|
+
code = $('<code />').text(this.formatXml(content));
|
1806
1843
|
pre = $('<pre class="xml" />').append(code);
|
1844
|
+
} else if (contentType === "text/html") {
|
1845
|
+
code = $('<code />').html(content);
|
1846
|
+
pre = $('<pre class="xml" />').append(code);
|
1847
|
+
} else if (/^image\//.test(contentType)) {
|
1848
|
+
pre = $('<img>').attr('src', response.url);
|
1849
|
+
} else {
|
1850
|
+
code = $('<code />').text(content);
|
1851
|
+
pre = $('<pre class="json" />').append(code);
|
1807
1852
|
}
|
1808
1853
|
response_body = pre;
|
1809
|
-
$(".
|
1854
|
+
$(".request_url", $(this.el)).html("<pre>" + response.url + "</pre>");
|
1855
|
+
$(".response_code", $(this.el)).html("<pre>" + response.status + "</pre>");
|
1810
1856
|
$(".response_body", $(this.el)).html(response_body);
|
1811
|
-
$(".response_headers", $(this.el)).html("<pre>" +
|
1857
|
+
$(".response_headers", $(this.el)).html("<pre>" + JSON.stringify(response.headers, null, " ").replace(/\n/g, "<br>") + "</pre>");
|
1812
1858
|
$(".response", $(this.el)).slideDown();
|
1813
1859
|
$(".response_hider", $(this.el)).show();
|
1814
1860
|
$(".response_throbber", $(this.el)).hide();
|
@@ -1817,7 +1863,7 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1817
1863
|
|
1818
1864
|
OperationView.prototype.toggleOperationContent = function() {
|
1819
1865
|
var elem;
|
1820
|
-
elem = $('#' + Docs.escapeResourceName(this.model.resourceName) + "_" + this.model.nickname + "_" + this.model.
|
1866
|
+
elem = $('#' + Docs.escapeResourceName(this.model.resourceName) + "_" + this.model.nickname + "_" + this.model.method + "_" + this.model.number + "_content");
|
1821
1867
|
if (elem.is(':visible')) {
|
1822
1868
|
return Docs.collapseOperation(elem);
|
1823
1869
|
} else {
|
@@ -1830,11 +1876,11 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1830
1876
|
})(Backbone.View);
|
1831
1877
|
|
1832
1878
|
StatusCodeView = (function(_super) {
|
1833
|
-
|
1834
1879
|
__extends(StatusCodeView, _super);
|
1835
1880
|
|
1836
1881
|
function StatusCodeView() {
|
1837
|
-
|
1882
|
+
_ref5 = StatusCodeView.__super__.constructor.apply(this, arguments);
|
1883
|
+
return _ref5;
|
1838
1884
|
}
|
1839
1885
|
|
1840
1886
|
StatusCodeView.prototype.initialize = function() {};
|
@@ -1855,21 +1901,22 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1855
1901
|
})(Backbone.View);
|
1856
1902
|
|
1857
1903
|
ParameterView = (function(_super) {
|
1858
|
-
|
1859
1904
|
__extends(ParameterView, _super);
|
1860
1905
|
|
1861
1906
|
function ParameterView() {
|
1862
|
-
|
1907
|
+
_ref6 = ParameterView.__super__.constructor.apply(this, arguments);
|
1908
|
+
return _ref6;
|
1863
1909
|
}
|
1864
1910
|
|
1865
1911
|
ParameterView.prototype.initialize = function() {};
|
1866
1912
|
|
1867
1913
|
ParameterView.prototype.render = function() {
|
1868
|
-
var contentTypeModel,
|
1914
|
+
var contentTypeModel, isParam, parameterContentTypeView, responseContentTypeView, signatureModel, signatureView, template, type;
|
1915
|
+
type = this.model.type || this.model.dataType;
|
1869
1916
|
if (this.model.paramType === 'body') {
|
1870
1917
|
this.model.isBody = true;
|
1871
1918
|
}
|
1872
|
-
if (
|
1919
|
+
if (type.toLowerCase() === 'file') {
|
1873
1920
|
this.model.isFile = true;
|
1874
1921
|
}
|
1875
1922
|
template = this.template();
|
@@ -1888,19 +1935,25 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1888
1935
|
} else {
|
1889
1936
|
$('.model-signature', $(this.el)).html(this.model.signature);
|
1890
1937
|
}
|
1938
|
+
isParam = false;
|
1939
|
+
if (this.model.isBody) {
|
1940
|
+
isParam = true;
|
1941
|
+
}
|
1891
1942
|
contentTypeModel = {
|
1892
|
-
isParam:
|
1943
|
+
isParam: isParam
|
1893
1944
|
};
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1945
|
+
contentTypeModel.consumes = this.model.consumes;
|
1946
|
+
if (isParam) {
|
1947
|
+
parameterContentTypeView = new ParameterContentTypeView({
|
1948
|
+
model: contentTypeModel
|
1949
|
+
});
|
1950
|
+
$('.parameter-content-type', $(this.el)).append(parameterContentTypeView.render().el);
|
1951
|
+
} else {
|
1952
|
+
responseContentTypeView = new ResponseContentTypeView({
|
1953
|
+
model: contentTypeModel
|
1954
|
+
});
|
1955
|
+
$('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);
|
1899
1956
|
}
|
1900
|
-
contentTypeView = new ContentTypeView({
|
1901
|
-
model: contentTypeModel
|
1902
|
-
});
|
1903
|
-
$('.content-type', $(this.el)).append(contentTypeView.render().el);
|
1904
1957
|
return this;
|
1905
1958
|
};
|
1906
1959
|
|
@@ -1929,11 +1982,11 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1929
1982
|
})(Backbone.View);
|
1930
1983
|
|
1931
1984
|
SignatureView = (function(_super) {
|
1932
|
-
|
1933
1985
|
__extends(SignatureView, _super);
|
1934
1986
|
|
1935
1987
|
function SignatureView() {
|
1936
|
-
|
1988
|
+
_ref7 = SignatureView.__super__.constructor.apply(this, arguments);
|
1989
|
+
return _ref7;
|
1937
1990
|
}
|
1938
1991
|
|
1939
1992
|
SignatureView.prototype.events = {
|
@@ -1998,11 +2051,11 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
1998
2051
|
})(Backbone.View);
|
1999
2052
|
|
2000
2053
|
ContentTypeView = (function(_super) {
|
2001
|
-
|
2002
2054
|
__extends(ContentTypeView, _super);
|
2003
2055
|
|
2004
2056
|
function ContentTypeView() {
|
2005
|
-
|
2057
|
+
_ref8 = ContentTypeView.__super__.constructor.apply(this, arguments);
|
2058
|
+
return _ref8;
|
2006
2059
|
}
|
2007
2060
|
|
2008
2061
|
ContentTypeView.prototype.initialize = function() {};
|
@@ -2011,12 +2064,7 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
2011
2064
|
var template;
|
2012
2065
|
template = this.template();
|
2013
2066
|
$(this.el).html(template(this.model));
|
2014
|
-
|
2015
|
-
if (this.isParam) {
|
2016
|
-
$('label[for=contentType]', $(this.el)).text('Parameter content type:');
|
2017
|
-
} else {
|
2018
|
-
$('label[for=contentType]', $(this.el)).text('Response Content Type');
|
2019
|
-
}
|
2067
|
+
$('label[for=contentType]', $(this.el)).text('Response Content Type');
|
2020
2068
|
return this;
|
2021
2069
|
};
|
2022
2070
|
|
@@ -2028,4 +2076,56 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|
2028
2076
|
|
2029
2077
|
})(Backbone.View);
|
2030
2078
|
|
2031
|
-
|
2079
|
+
ResponseContentTypeView = (function(_super) {
|
2080
|
+
__extends(ResponseContentTypeView, _super);
|
2081
|
+
|
2082
|
+
function ResponseContentTypeView() {
|
2083
|
+
_ref9 = ResponseContentTypeView.__super__.constructor.apply(this, arguments);
|
2084
|
+
return _ref9;
|
2085
|
+
}
|
2086
|
+
|
2087
|
+
ResponseContentTypeView.prototype.initialize = function() {};
|
2088
|
+
|
2089
|
+
ResponseContentTypeView.prototype.render = function() {
|
2090
|
+
var template;
|
2091
|
+
template = this.template();
|
2092
|
+
$(this.el).html(template(this.model));
|
2093
|
+
$('label[for=responseContentType]', $(this.el)).text('Response Content Type');
|
2094
|
+
return this;
|
2095
|
+
};
|
2096
|
+
|
2097
|
+
ResponseContentTypeView.prototype.template = function() {
|
2098
|
+
return Handlebars.templates.response_content_type;
|
2099
|
+
};
|
2100
|
+
|
2101
|
+
return ResponseContentTypeView;
|
2102
|
+
|
2103
|
+
})(Backbone.View);
|
2104
|
+
|
2105
|
+
ParameterContentTypeView = (function(_super) {
|
2106
|
+
__extends(ParameterContentTypeView, _super);
|
2107
|
+
|
2108
|
+
function ParameterContentTypeView() {
|
2109
|
+
_ref10 = ParameterContentTypeView.__super__.constructor.apply(this, arguments);
|
2110
|
+
return _ref10;
|
2111
|
+
}
|
2112
|
+
|
2113
|
+
ParameterContentTypeView.prototype.initialize = function() {};
|
2114
|
+
|
2115
|
+
ParameterContentTypeView.prototype.render = function() {
|
2116
|
+
var template;
|
2117
|
+
template = this.template();
|
2118
|
+
$(this.el).html(template(this.model));
|
2119
|
+
$('label[for=parameterContentType]', $(this.el)).text('Parameter content type:');
|
2120
|
+
return this;
|
2121
|
+
};
|
2122
|
+
|
2123
|
+
ParameterContentTypeView.prototype.template = function() {
|
2124
|
+
return Handlebars.templates.parameter_content_type;
|
2125
|
+
};
|
2126
|
+
|
2127
|
+
return ParameterContentTypeView;
|
2128
|
+
|
2129
|
+
})(Backbone.View);
|
2130
|
+
|
2131
|
+
}).call(this);
|