Merge pull request #1656 from dalbani/patch-1
Simplify online validator URL building (HTTP[S]?)
This commit is contained in:
@@ -61,13 +61,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
|
||||
// Localhost override
|
||||
this.model.validatorUrl = null;
|
||||
} else {
|
||||
// Default validator
|
||||
if(window.location.protocol === 'https:') {
|
||||
this.model.validatorUrl = 'https://online.swagger.io/validator';
|
||||
}
|
||||
else {
|
||||
this.model.validatorUrl = 'http://online.swagger.io/validator';
|
||||
}
|
||||
this.model.validatorUrl = '//online.swagger.io/validator';
|
||||
}
|
||||
|
||||
// JSonEditor requires type='object' to be present on defined types, we add it if it's missing
|
||||
|
||||
Reference in New Issue
Block a user