fix for #819
This commit is contained in:
8
dist/lib/swagger-client.js
vendored
8
dist/lib/swagger-client.js
vendored
@@ -1163,8 +1163,12 @@ SwaggerOperation.prototype.encodePathParam = function (pathParam) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
SwaggerOperation.prototype.urlify = function (args) {
|
SwaggerOperation.prototype.urlify = function (args) {
|
||||||
var i, j, param;
|
var i, j, param, url;
|
||||||
var url = this.resource.basePath + this.pathJson();
|
// ensure no double slashing...
|
||||||
|
if(this.resource.basePath.length > 1 && this.resource.basePath.slice(-1) === '/' && this.pathJson().charAt(0) === '/')
|
||||||
|
url = this.resource.basePath + this.pathJson().substring(1);
|
||||||
|
else
|
||||||
|
url = this.resource.basePath + this.pathJson();
|
||||||
var params = this.parameters;
|
var params = this.parameters;
|
||||||
for (i = 0; i < params.length; i++) {
|
for (i = 0; i < params.length; i++) {
|
||||||
param = params[i];
|
param = params[i];
|
||||||
|
|||||||
480
dist/swagger-ui.js
vendored
480
dist/swagger-ui.js
vendored
@@ -1,187 +1,3 @@
|
|||||||
$(function() {
|
|
||||||
|
|
||||||
// Helper function for vertically aligning DOM elements
|
|
||||||
// http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/
|
|
||||||
$.fn.vAlign = function() {
|
|
||||||
return this.each(function(i){
|
|
||||||
var ah = $(this).height();
|
|
||||||
var ph = $(this).parent().height();
|
|
||||||
var mh = (ph - ah) / 2;
|
|
||||||
$(this).css('margin-top', mh);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$.fn.stretchFormtasticInputWidthToParent = function() {
|
|
||||||
return this.each(function(i){
|
|
||||||
var p_width = $(this).closest("form").innerWidth();
|
|
||||||
var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest("form").css('padding-right'), 10);
|
|
||||||
var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);
|
|
||||||
$(this).css('width', p_width - p_padding - this_padding);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent();
|
|
||||||
|
|
||||||
// Vertically center these paragraphs
|
|
||||||
// Parent may need a min-height for this to work..
|
|
||||||
$('ul.downplayed li div.content p').vAlign();
|
|
||||||
|
|
||||||
// When a sandbox form is submitted..
|
|
||||||
$("form.sandbox").submit(function(){
|
|
||||||
|
|
||||||
var error_free = true;
|
|
||||||
|
|
||||||
// Cycle through the forms required inputs
|
|
||||||
$(this).find("input.required").each(function() {
|
|
||||||
|
|
||||||
// Remove any existing error styles from the input
|
|
||||||
$(this).removeClass('error');
|
|
||||||
|
|
||||||
// Tack the error style on if the input is empty..
|
|
||||||
if ($(this).val() == '') {
|
|
||||||
$(this).addClass('error');
|
|
||||||
$(this).wiggle();
|
|
||||||
error_free = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
return error_free;
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
function clippyCopiedCallback(a) {
|
|
||||||
$('#api_key_copied').fadeIn().delay(1000).fadeOut();
|
|
||||||
|
|
||||||
// var b = $("#clippy_tooltip_" + a);
|
|
||||||
// b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() {
|
|
||||||
// b.attr("title", "copy to clipboard")
|
|
||||||
// },
|
|
||||||
// 500))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Logging function that accounts for browsers that don't have window.console
|
|
||||||
log = function(){
|
|
||||||
log.history = log.history || [];
|
|
||||||
log.history.push(arguments);
|
|
||||||
if(this.console){
|
|
||||||
console.log( Array.prototype.slice.call(arguments)[0] );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913)
|
|
||||||
if (Function.prototype.bind && console && typeof console.log == "object") {
|
|
||||||
[
|
|
||||||
"log","info","warn","error","assert","dir","clear","profile","profileEnd"
|
|
||||||
].forEach(function (method) {
|
|
||||||
console[method] = this.bind(console[method], console);
|
|
||||||
}, Function.prototype.call);
|
|
||||||
}
|
|
||||||
|
|
||||||
var Docs = {
|
|
||||||
|
|
||||||
shebang: function() {
|
|
||||||
|
|
||||||
// If shebang has an operation nickname in it..
|
|
||||||
// e.g. /docs/#!/words/get_search
|
|
||||||
var fragments = $.param.fragment().split('/');
|
|
||||||
fragments.shift(); // get rid of the bang
|
|
||||||
|
|
||||||
switch (fragments.length) {
|
|
||||||
case 1:
|
|
||||||
// Expand all operations for the resource and scroll to it
|
|
||||||
var dom_id = 'resource_' + fragments[0];
|
|
||||||
|
|
||||||
Docs.expandEndpointListForResource(fragments[0]);
|
|
||||||
$("#"+dom_id).slideto({highlight: false});
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
// Refer to the endpoint DOM element, e.g. #words_get_search
|
|
||||||
|
|
||||||
// Expand Resource
|
|
||||||
Docs.expandEndpointListForResource(fragments[0]);
|
|
||||||
$("#"+dom_id).slideto({highlight: false});
|
|
||||||
|
|
||||||
// Expand operation
|
|
||||||
var li_dom_id = fragments.join('_');
|
|
||||||
var li_content_dom_id = li_dom_id + "_content";
|
|
||||||
|
|
||||||
|
|
||||||
Docs.expandOperation($('#'+li_content_dom_id));
|
|
||||||
$('#'+li_dom_id).slideto({highlight: false});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleEndpointListForResource: function(resource) {
|
|
||||||
var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints');
|
|
||||||
if (elem.is(':visible')) {
|
|
||||||
Docs.collapseEndpointListForResource(resource);
|
|
||||||
} else {
|
|
||||||
Docs.expandEndpointListForResource(resource);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Expand resource
|
|
||||||
expandEndpointListForResource: function(resource) {
|
|
||||||
var resource = Docs.escapeResourceName(resource);
|
|
||||||
if (resource == '') {
|
|
||||||
$('.resource ul.endpoints').slideDown();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$('li#resource_' + resource).addClass('active');
|
|
||||||
|
|
||||||
var elem = $('li#resource_' + resource + ' ul.endpoints');
|
|
||||||
elem.slideDown();
|
|
||||||
},
|
|
||||||
|
|
||||||
// Collapse resource and mark as explicitly closed
|
|
||||||
collapseEndpointListForResource: function(resource) {
|
|
||||||
var resource = Docs.escapeResourceName(resource);
|
|
||||||
$('li#resource_' + resource).removeClass('active');
|
|
||||||
|
|
||||||
var elem = $('li#resource_' + resource + ' ul.endpoints');
|
|
||||||
elem.slideUp();
|
|
||||||
},
|
|
||||||
|
|
||||||
expandOperationsForResource: function(resource) {
|
|
||||||
// Make sure the resource container is open..
|
|
||||||
Docs.expandEndpointListForResource(resource);
|
|
||||||
|
|
||||||
if (resource == '') {
|
|
||||||
$('.resource ul.endpoints li.operation div.content').slideDown();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {
|
|
||||||
Docs.expandOperation($(this));
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
collapseOperationsForResource: function(resource) {
|
|
||||||
// Make sure the resource container is open..
|
|
||||||
Docs.expandEndpointListForResource(resource);
|
|
||||||
|
|
||||||
$('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {
|
|
||||||
Docs.collapseOperation($(this));
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
escapeResourceName: function(resource) {
|
|
||||||
return resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g, "\\$&");
|
|
||||||
},
|
|
||||||
|
|
||||||
expandOperation: function(elem) {
|
|
||||||
elem.slideDown();
|
|
||||||
},
|
|
||||||
|
|
||||||
collapseOperation: function(elem) {
|
|
||||||
elem.slideUp();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var SwaggerUi,
|
var SwaggerUi,
|
||||||
__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; },
|
__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; },
|
||||||
__hasProp = {}.hasOwnProperty;
|
__hasProp = {}.hasOwnProperty;
|
||||||
@@ -373,6 +189,190 @@ SwaggerUi = (function(_super) {
|
|||||||
|
|
||||||
window.SwaggerUi = SwaggerUi;
|
window.SwaggerUi = SwaggerUi;
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
|
||||||
|
// Helper function for vertically aligning DOM elements
|
||||||
|
// http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/
|
||||||
|
$.fn.vAlign = function() {
|
||||||
|
return this.each(function(i){
|
||||||
|
var ah = $(this).height();
|
||||||
|
var ph = $(this).parent().height();
|
||||||
|
var mh = (ph - ah) / 2;
|
||||||
|
$(this).css('margin-top', mh);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.stretchFormtasticInputWidthToParent = function() {
|
||||||
|
return this.each(function(i){
|
||||||
|
var p_width = $(this).closest("form").innerWidth();
|
||||||
|
var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest("form").css('padding-right'), 10);
|
||||||
|
var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);
|
||||||
|
$(this).css('width', p_width - p_padding - this_padding);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
$('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent();
|
||||||
|
|
||||||
|
// Vertically center these paragraphs
|
||||||
|
// Parent may need a min-height for this to work..
|
||||||
|
$('ul.downplayed li div.content p').vAlign();
|
||||||
|
|
||||||
|
// When a sandbox form is submitted..
|
||||||
|
$("form.sandbox").submit(function(){
|
||||||
|
|
||||||
|
var error_free = true;
|
||||||
|
|
||||||
|
// Cycle through the forms required inputs
|
||||||
|
$(this).find("input.required").each(function() {
|
||||||
|
|
||||||
|
// Remove any existing error styles from the input
|
||||||
|
$(this).removeClass('error');
|
||||||
|
|
||||||
|
// Tack the error style on if the input is empty..
|
||||||
|
if ($(this).val() == '') {
|
||||||
|
$(this).addClass('error');
|
||||||
|
$(this).wiggle();
|
||||||
|
error_free = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
return error_free;
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function clippyCopiedCallback(a) {
|
||||||
|
$('#api_key_copied').fadeIn().delay(1000).fadeOut();
|
||||||
|
|
||||||
|
// var b = $("#clippy_tooltip_" + a);
|
||||||
|
// b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() {
|
||||||
|
// b.attr("title", "copy to clipboard")
|
||||||
|
// },
|
||||||
|
// 500))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Logging function that accounts for browsers that don't have window.console
|
||||||
|
log = function(){
|
||||||
|
log.history = log.history || [];
|
||||||
|
log.history.push(arguments);
|
||||||
|
if(this.console){
|
||||||
|
console.log( Array.prototype.slice.call(arguments)[0] );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913)
|
||||||
|
if (Function.prototype.bind && console && typeof console.log == "object") {
|
||||||
|
[
|
||||||
|
"log","info","warn","error","assert","dir","clear","profile","profileEnd"
|
||||||
|
].forEach(function (method) {
|
||||||
|
console[method] = this.bind(console[method], console);
|
||||||
|
}, Function.prototype.call);
|
||||||
|
}
|
||||||
|
|
||||||
|
var Docs = {
|
||||||
|
|
||||||
|
shebang: function() {
|
||||||
|
|
||||||
|
// If shebang has an operation nickname in it..
|
||||||
|
// e.g. /docs/#!/words/get_search
|
||||||
|
var fragments = $.param.fragment().split('/');
|
||||||
|
fragments.shift(); // get rid of the bang
|
||||||
|
|
||||||
|
switch (fragments.length) {
|
||||||
|
case 1:
|
||||||
|
// Expand all operations for the resource and scroll to it
|
||||||
|
var dom_id = 'resource_' + fragments[0];
|
||||||
|
|
||||||
|
Docs.expandEndpointListForResource(fragments[0]);
|
||||||
|
$("#"+dom_id).slideto({highlight: false});
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
// Refer to the endpoint DOM element, e.g. #words_get_search
|
||||||
|
|
||||||
|
// Expand Resource
|
||||||
|
Docs.expandEndpointListForResource(fragments[0]);
|
||||||
|
$("#"+dom_id).slideto({highlight: false});
|
||||||
|
|
||||||
|
// Expand operation
|
||||||
|
var li_dom_id = fragments.join('_');
|
||||||
|
var li_content_dom_id = li_dom_id + "_content";
|
||||||
|
|
||||||
|
|
||||||
|
Docs.expandOperation($('#'+li_content_dom_id));
|
||||||
|
$('#'+li_dom_id).slideto({highlight: false});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleEndpointListForResource: function(resource) {
|
||||||
|
var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints');
|
||||||
|
if (elem.is(':visible')) {
|
||||||
|
Docs.collapseEndpointListForResource(resource);
|
||||||
|
} else {
|
||||||
|
Docs.expandEndpointListForResource(resource);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Expand resource
|
||||||
|
expandEndpointListForResource: function(resource) {
|
||||||
|
var resource = Docs.escapeResourceName(resource);
|
||||||
|
if (resource == '') {
|
||||||
|
$('.resource ul.endpoints').slideDown();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('li#resource_' + resource).addClass('active');
|
||||||
|
|
||||||
|
var elem = $('li#resource_' + resource + ' ul.endpoints');
|
||||||
|
elem.slideDown();
|
||||||
|
},
|
||||||
|
|
||||||
|
// Collapse resource and mark as explicitly closed
|
||||||
|
collapseEndpointListForResource: function(resource) {
|
||||||
|
var resource = Docs.escapeResourceName(resource);
|
||||||
|
$('li#resource_' + resource).removeClass('active');
|
||||||
|
|
||||||
|
var elem = $('li#resource_' + resource + ' ul.endpoints');
|
||||||
|
elem.slideUp();
|
||||||
|
},
|
||||||
|
|
||||||
|
expandOperationsForResource: function(resource) {
|
||||||
|
// Make sure the resource container is open..
|
||||||
|
Docs.expandEndpointListForResource(resource);
|
||||||
|
|
||||||
|
if (resource == '') {
|
||||||
|
$('.resource ul.endpoints li.operation div.content').slideDown();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {
|
||||||
|
Docs.expandOperation($(this));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
collapseOperationsForResource: function(resource) {
|
||||||
|
// Make sure the resource container is open..
|
||||||
|
Docs.expandEndpointListForResource(resource);
|
||||||
|
|
||||||
|
$('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {
|
||||||
|
Docs.collapseOperation($(this));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
escapeResourceName: function(resource) {
|
||||||
|
return resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g, "\\$&");
|
||||||
|
},
|
||||||
|
|
||||||
|
expandOperation: function(elem) {
|
||||||
|
elem.slideDown();
|
||||||
|
},
|
||||||
|
|
||||||
|
collapseOperation: function(elem) {
|
||||||
|
elem.slideUp();
|
||||||
|
}
|
||||||
|
};
|
||||||
this["Handlebars"] = this["Handlebars"] || {};
|
this["Handlebars"] = this["Handlebars"] || {};
|
||||||
this["Handlebars"]["templates"] = this["Handlebars"]["templates"] || {};
|
this["Handlebars"]["templates"] = this["Handlebars"]["templates"] || {};
|
||||||
this["Handlebars"]["templates"]["apikey_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
this["Handlebars"]["templates"]["apikey_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||||
@@ -839,6 +839,62 @@ HeaderView = (function(_super) {
|
|||||||
|
|
||||||
})(Backbone.View);
|
})(Backbone.View);
|
||||||
|
|
||||||
|
this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||||
|
return " multiple='multiple'";
|
||||||
|
},"3":function(depth0,helpers,partials,data) {
|
||||||
|
return "";
|
||||||
|
},"5":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(6, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"6":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, helperMissing=helpers.helperMissing, buffer = "";
|
||||||
|
stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(3, data),"inverse":this.program(7, data),"data":data}));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"7":function(depth0,helpers,partials,data) {
|
||||||
|
return " <option selected=\"\" value=''></option>\n";
|
||||||
|
},"9":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isDefault : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"10":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " <option selected=\"\" value='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'>"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
||||||
|
+ " (default)</option>\n";
|
||||||
|
},"12":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " <option value='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'>"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
||||||
|
+ "</option>\n";
|
||||||
|
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'>"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "</td>\n<td>\n <select ";
|
||||||
|
stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
buffer += " class='parameter' name='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'>\n";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(5, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
stack1 = helpers.each.call(depth0, ((stack1 = (depth0 != null ? depth0.allowableValues : depth0)) != null ? stack1.descriptiveValues : stack1), {"name":"each","hash":{},"fn":this.program(9, data),"inverse":this.noop,"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
buffer += " </select>\n</td>\n<td class=\"markdown\">";
|
||||||
|
stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
buffer += "</td>\n<td>";
|
||||||
|
stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>";
|
||||||
|
},"useData":true});
|
||||||
var MainView,
|
var MainView,
|
||||||
__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; },
|
__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; },
|
||||||
__hasProp = {}.hasOwnProperty;
|
__hasProp = {}.hasOwnProperty;
|
||||||
@@ -965,62 +1021,6 @@ MainView = (function(_super) {
|
|||||||
|
|
||||||
})(Backbone.View);
|
})(Backbone.View);
|
||||||
|
|
||||||
this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
|
||||||
return " multiple='multiple'";
|
|
||||||
},"3":function(depth0,helpers,partials,data) {
|
|
||||||
return "";
|
|
||||||
},"5":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(6, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"6":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, helperMissing=helpers.helperMissing, buffer = "";
|
|
||||||
stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(3, data),"inverse":this.program(7, data),"data":data}));
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"7":function(depth0,helpers,partials,data) {
|
|
||||||
return " <option selected=\"\" value=''></option>\n";
|
|
||||||
},"9":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isDefault : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"10":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <option selected=\"\" value='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'>"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
|
||||||
+ " (default)</option>\n";
|
|
||||||
},"12":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <option value='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'>"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
|
||||||
+ "</option>\n";
|
|
||||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'>"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "</td>\n<td>\n <select ";
|
|
||||||
stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}));
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
buffer += " class='parameter' name='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'>\n";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(5, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
stack1 = helpers.each.call(depth0, ((stack1 = (depth0 != null ? depth0.allowableValues : depth0)) != null ? stack1.descriptiveValues : stack1), {"name":"each","hash":{},"fn":this.program(9, data),"inverse":this.noop,"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
buffer += " </select>\n</td>\n<td class=\"markdown\">";
|
|
||||||
stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
buffer += "</td>\n<td>";
|
|
||||||
stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>";
|
|
||||||
},"useData":true});
|
|
||||||
this["Handlebars"]["templates"]["param_readonly"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
this["Handlebars"]["templates"]["param_readonly"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
return " <textarea class='body-textarea' readonly='readonly' name='"
|
return " <textarea class='body-textarea' readonly='readonly' name='"
|
||||||
|
|||||||
2
dist/swagger-ui.min.js
vendored
2
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1163,8 +1163,12 @@ SwaggerOperation.prototype.encodePathParam = function (pathParam) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
SwaggerOperation.prototype.urlify = function (args) {
|
SwaggerOperation.prototype.urlify = function (args) {
|
||||||
var i, j, param;
|
var i, j, param, url;
|
||||||
var url = this.resource.basePath + this.pathJson();
|
// ensure no double slashing...
|
||||||
|
if(this.resource.basePath.length > 1 && this.resource.basePath.slice(-1) === '/' && this.pathJson().charAt(0) === '/')
|
||||||
|
url = this.resource.basePath + this.pathJson().substring(1);
|
||||||
|
else
|
||||||
|
url = this.resource.basePath + this.pathJson();
|
||||||
var params = this.parameters;
|
var params = this.parameters;
|
||||||
for (i = 0; i < params.length; i++) {
|
for (i = 0; i < params.length; i++) {
|
||||||
param = params[i];
|
param = params[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user