Skip to content

Instantly share code, notes, and snippets.

@stew
Created July 12, 2013 20:05
Show Gist options
  • Select an option

  • Save stew/5987346 to your computer and use it in GitHub Desktop.

Select an option

Save stew/5987346 to your computer and use it in GitHub Desktop.
diff --git a/dist/lib/swagger.js b/dist/lib/swagger.js
index 0905b64..291215b 100644
--- a/dist/lib/swagger.js
+++ b/dist/lib/swagger.js
@@ -56,16 +56,16 @@
if (response.apiVersion != null) {
_this.apiVersion = response.apiVersion;
}
- if ((response.basePath != null) && jQuery.trim(response.basePath).length > 0) {
- _this.basePath = response.basePath;
- if (_this.basePath.match(/^HTTP/i) == null) {
- _this.fail("discoveryUrl basePath must be a URL.");
- }
- _this.basePath = _this.basePath.replace(/\/$/, '');
- } else {
+// if ((response.basePath != null) && jQuery.trim(response.basePath).length > 0) {
+// _this.basePath = response.basePath;
+// if (_this.basePath.match(/^HTTP/i) == null) {
+// _this.fail("discoveryUrl basePath must be a URL.");
+// }
+// _this.basePath = _this.basePath.replace(/\/$/, '');
+// } else {
_this.basePath = _this.discoveryUrl.substring(0, _this.discoveryUrl.lastIndexOf('/'));
log('derived basepath from discoveryUrl as ' + _this.basePath);
- }
+// }
_this.resources = {};
_this.resourcesArray = [];
if (response.resourcePath != null) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment