proposed fix for #731

This commit is contained in:
Tony Tam
2014-11-19 07:12:40 -08:00
parent 53fd2f013f
commit 616085680f
4 changed files with 953 additions and 5 deletions

4
dist/swagger-ui.js vendored
View File

@@ -1575,8 +1575,8 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
if (this.model.swaggerVersion === "2.0") {
if ("validatorUrl" in opts.swaggerOptions) {
return this.model.validatorUrl = opts.swaggerOptions.validatorUrl;
} else if (this.model.url.match(/https?:\/\/localhost/)) {
return this.model.validatorUrl = this.model.url;
} else if (this.model.url.indexOf("localhost") > 0) {
return this.model.validatorUrl = null;
} else {
return this.model.validatorUrl = "http://online.swagger.io/validator";
}