提交 a2c1c18f 编写于 作者: F fehguy

Merge pull request #20 from aaronmccall/master

Correct issue where top-level (only one initial slash) paths have no name
......@@ -92,7 +92,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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册