Fixed conflicts

This commit is contained in:
bpinkney
2012-01-24 14:12:05 -05:00
committed by zeke
parent c71371d016
commit 739219d306

View File

@@ -65,7 +65,11 @@ function SwaggerService(baseUrl, _apiKey, statusCallback) {
this.path_xml = this.path.replace("{format}", "xml"); this.path_xml = this.path.replace("{format}", "xml");
this.baseUrl = apiHost; this.baseUrl = apiHost;
//execluded 9 letters to remove .{format} from name //execluded 9 letters to remove .{format} from name
this.name = this.path.substr(1, this.path.length - formatString.length - 1).replace(/\//g, "_"); if (this.path.indexOf(formatString) != -1){
this.name = this.path.substr(1, this.path.length - formatString.length - 1).replace(/\//g, "_");
} else {
this.name = this.path.substr(1, this.path.length - 1).replace(/\//g, "_");
}
this.apiList = Api.sub(); this.apiList = Api.sub();
this.modelList = ApiModel.sub(); this.modelList = ApiModel.sub();
}, },
@@ -99,6 +103,10 @@ function SwaggerService(baseUrl, _apiKey, statusCallback) {
this.path_json = prefix.replace("{format}", "json") + suffix; this.path_json = prefix.replace("{format}", "json") + suffix;
this.path_xml = prefix.replace("{format}", "xml") + suffix;; this.path_xml = prefix.replace("{format}", "xml") + suffix;;
if (this.path.indexOf(formatString) == -1){
formatString = "";
}
if (this.path.indexOf("/") == 0) { if (this.path.indexOf("/") == 0) {
this.name = this.path.substr(1, secondPathSeperatorIndex - formatString.length - 1); this.name = this.path.substr(1, secondPathSeperatorIndex - formatString.length - 1);
} else { } else {