ソースを参照

fixes https://github.com/wordnik/swagger-core/issues/68 in a generic way. Should work with all params.

bubble
predicador37 12年前
コミット
30886478d4
1個のファイルの変更2行の追加2行の削除
  1. +2
    -2
      lib/swagger.js

+ 2
- 2
lib/swagger.js ファイルの表示

@@ -572,8 +572,8 @@
param = _ref[_i];
if (param.paramType === 'path') {
if (args[param.name]) {
url = url.replace(/{id.*/, '{id}');
url = url.replace("{" + param.name + "}", encodeURIComponent(args[param.name]));
reg = new RegExp('\{'+param.name+'[^\}]*\}', 'gi');
url = url.replace(reg, encodeURIComponent(args[param.name]));
delete args[param.name];
} else {
throw "" + param.name + " is a required path param.";


読み込み中…
キャンセル
保存