Corrected bug where top level (only one initial '/') api paths get no name.
This commit is contained in:
@@ -91,7 +91,7 @@ function SwaggerService(discoveryUrl, _apiKey, statusCallback) {
|
||||
if (atts) this.load(atts);
|
||||
|
||||
var sep = this.path.lastIndexOf("/");
|
||||
this.name = this.path.substr(0, sep).replace(".{format}", "").replace(/\//g, "_");
|
||||
this.name = (sep!==0?this.path.substr(0, sep):this.path).replace(".{format}", "").replace(/\//g, "_");
|
||||
|
||||
var secondPathSeperatorIndex = this.path.indexOf("/", 1);
|
||||
if (secondPathSeperatorIndex > 0) {
|
||||
|
||||
Reference in New Issue
Block a user