File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ class SwaggerOperation
276
276
if param .paramType == ' path'
277
277
278
278
if args[param .name ]
279
- url = url .replace (" {#{ param .name } }" , args[param .name ])
279
+ url = url .replace (" {#{ param .name } }" , encodeURIComponent ( args[param .name ]) )
280
280
delete args[param .name ]
281
281
else
282
282
throw " #{ param .name } is a required path param."
@@ -310,10 +310,12 @@ class SwaggerOperation
310
310
getMatchingParams : (paramTypes , args , includeApiKey ) ->
311
311
matchingParams = {}
312
312
for param in @parameters
313
- matchingParams[param .name ] = args[param .name ] if jQuery .inArray (param .paramType , paramTypes) and args[param .name ]
313
+ if (jQuery .inArray (param .paramType , paramTypes) >= 0 ) and args[param .name ]
314
+ matchingParams[param .name ] = args[param .name ]
314
315
315
- # maMchingParams API key to the params
316
- matchingParams[' api_key' ] = @resource .api .api_key if includeApiKey and @resource .api .api_key ? and @resource .api .api_key .length > 0
316
+ # machingParams API key to the params
317
+ if includeApiKey and @resource .api .api_key ? and @resource .api .api_key .length > 0
318
+ matchingParams[' api_key' ] = @resource .api .api_key
317
319
318
320
matchingParams
319
321
You can’t perform that action at this time.
0 commit comments