From 4cbaddd3b15526b2c2f27c472f79b34ec06346f0 Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Fri, 8 May 2015 12:06:56 -0700 Subject: [PATCH] added fix from outdated PR #1122 --- swagger-ui.js | 14 ++++++++------ swagger-ui.min.js | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/swagger-ui.js b/swagger-ui.js index f532c6571e3..595740ed303 100644 --- a/swagger-ui.js +++ b/swagger-ui.js @@ -20867,7 +20867,9 @@ SwaggerUi.Views.MainView = Backbone.View.extend({ } else { // Default validator - this.model.validatorUrl = window.location.protocol + '//online.swagger.io/validator'; + if(window.location.protocol.startsWith('http')) { + this.model.validatorUrl = window.location.protocol + '//online.swagger.io/validator'; + } } } }, @@ -21252,7 +21254,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ if (isFileUpload) { return this.handleFileUpload(map, form); } else { - return this.model['do'](map, opts, this.showCompleteStatus, this.showErrorStatus, this); + return this.model.execute(map, this.options.swaggerOptions || {}, this.showCompleteStatus, this.showErrorStatus, this); } } }, @@ -21547,10 +21549,10 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ pre = $('