Ver a proveniência

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

bubble
predicador37 há 12 anos
ascendente
cometimento
30886478d4
1 ficheiros alterados com 2 adições e 2 eliminações
  1. +2
    -2
      lib/swagger.js

+ 2
- 2
lib/swagger.js Ver ficheiro

@@ -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.";


Carregando…
Cancelar
Guardar