added relative file logic

This commit is contained in:
Tony Tam 2016-01-04 20:19:00 -08:00
parent ba8e992806
commit d18d848729

View File

@ -27,7 +27,7 @@
if (url && url.length > 1) {
url = decodeURIComponent(url[1]);
} else {
url = "https://generator.swagger.io/api/swagger.json";
url = window.location.protocol + '//' + window.location.host + '/api/swagger.json';
}
window.swaggerUi = new SwaggerUi({
url: url,