Merge branch 'develop_2.0' into fix-1109
This commit is contained in:
@@ -69,11 +69,15 @@
|
|||||||
/*
|
/*
|
||||||
var apiKey = "myApiKeyXXXX123456789";
|
var apiKey = "myApiKeyXXXX123456789";
|
||||||
$('#input_apiKey').val(apiKey);
|
$('#input_apiKey').val(apiKey);
|
||||||
addApiKeyAuthorization();
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
window.swaggerUi.load();
|
window.swaggerUi.load();
|
||||||
|
|
||||||
|
// Add authorization if auth input is not empty
|
||||||
|
if ($('#input_apiKey').val().length) {
|
||||||
|
addApiKeyAuthorization();
|
||||||
|
}
|
||||||
|
|
||||||
function log() {
|
function log() {
|
||||||
if ('console' in window) {
|
if ('console' in window) {
|
||||||
console.log.apply(console, arguments);
|
console.log.apply(console, arguments);
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
// Note: This is compiled code
|
// Note: This is compiled code
|
||||||
// TODO: Refactor
|
// TODO: Refactor
|
||||||
handleFileUpload: function(map, form) {
|
handleFileUpload: function(map, form) {
|
||||||
var bodyParam, el, headerParams, l, len, len1, len2, len3, m, n, o, obj, p, param, params, ref1, ref2, ref3, ref4;
|
var bodyParam, el, headerParams, l, len, len1, len2, len3, m, n, o, p, param, params, ref1, ref2, ref3, ref4;
|
||||||
ref1 = form.serializeArray();
|
ref1 = form.serializeArray();
|
||||||
for (l = 0, len = ref1.length; l < len; l++) {
|
for (l = 0, len = ref1.length; l < len; l++) {
|
||||||
o = ref1[l];
|
o = ref1[l];
|
||||||
@@ -363,7 +363,9 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
this.invocationUrl = this.model.supportHeaderParams() ? (headerParams = this.model.getHeaderParams(map), delete headerParams['Content-Type'], this.model.urlify(map, false)) : this.model.urlify(map, true);
|
this.invocationUrl = this.model.supportHeaderParams() ? (headerParams = this.model.getHeaderParams(map), delete headerParams['Content-Type'], this.model.urlify(map, false)) : this.model.urlify(map, true);
|
||||||
$('.request_url', $(this.el)).html('<pre></pre>');
|
$('.request_url', $(this.el)).html('<pre></pre>');
|
||||||
$('.request_url pre', $(this.el)).text(this.invocationUrl);
|
$('.request_url pre', $(this.el)).text(this.invocationUrl);
|
||||||
obj = {
|
|
||||||
|
// TODO: don't use jQuery. Use SwaggerJS for handling the call.
|
||||||
|
var obj = {
|
||||||
type: this.model.method,
|
type: this.model.method,
|
||||||
url: this.invocationUrl,
|
url: this.invocationUrl,
|
||||||
headers: headerParams,
|
headers: headerParams,
|
||||||
@@ -387,9 +389,6 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
};
|
};
|
||||||
})(this)
|
})(this)
|
||||||
};
|
};
|
||||||
if (window.authorizations) {
|
|
||||||
window.authorizations.apply(obj);
|
|
||||||
}
|
|
||||||
jQuery.ajax(obj);
|
jQuery.ajax(obj);
|
||||||
return false;
|
return false;
|
||||||
// end of file-upload nastiness
|
// end of file-upload nastiness
|
||||||
|
|||||||
Reference in New Issue
Block a user