Browse Source

coffeescript compiled swagger.js for #91

bubble
Ayush Gupta 12 years ago
parent
commit
a1337cf118
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      lib/swagger.js

+ 2
- 2
lib/swagger.js View File

@@ -562,7 +562,7 @@
}; };


SwaggerOperation.prototype.urlify = function(args, includeApiKey) { SwaggerOperation.prototype.urlify = function(args, includeApiKey) {
var param, queryParams, url, _i, _len, _ref;
var param, queryParams, reg, url, _i, _len, _ref;
if (includeApiKey == null) { if (includeApiKey == null) {
includeApiKey = true; includeApiKey = true;
} }
@@ -572,7 +572,7 @@
param = _ref[_i]; param = _ref[_i];
if (param.paramType === 'path') { if (param.paramType === 'path') {
if (args[param.name]) { if (args[param.name]) {
reg = new RegExp('\{'+param.name+'[^\}]*\}', 'gi');
reg = new RegExp('\{' + param.name + '[^\}]*\}', 'gi');
url = url.replace(reg, encodeURIComponent(args[param.name])); url = url.replace(reg, encodeURIComponent(args[param.name]));
delete args[param.name]; delete args[param.name];
} else { } else {


Loading…
Cancel
Save