swagger-police
Advanced tools
Comparing version 0.0.5-beta to 0.0.6-beta
@@ -19,4 +19,4 @@ 'use strict'; | ||
if (!_.isEmpty(request.pathParams)) { | ||
_.entries(request.pathParams, ([key, value]) => { | ||
path.replace(`{${key}}`, value); | ||
_.entries(request.pathParams).forEach(([key, value]) => { | ||
path = path.replace(`{${key}}`, value); | ||
}); | ||
@@ -23,0 +23,0 @@ } |
@@ -38,21 +38,21 @@ 'use strict'; | ||
switch (param.in) { | ||
case 'query': | ||
requestParams.query[param.name] = sampleData; | ||
break; | ||
case 'query': | ||
requestParams.query[param.name] = sampleData; | ||
break; | ||
case 'header': | ||
requestParams.headers[param.name] = sampleData; | ||
break; | ||
case 'header': | ||
requestParams.headers[param.name] = sampleData; | ||
break; | ||
case 'path': | ||
requestParams.pathParams[param.name] = sampleData; | ||
break; | ||
case 'path': | ||
requestParams.pathParams[param.name] = sampleData; | ||
break; | ||
case 'body': | ||
requestParams.body = sampleData; | ||
break; | ||
case 'body': | ||
requestParams.body = sampleData; | ||
break; | ||
case 'formData': | ||
requestParams.form = sampleData; | ||
break; | ||
case 'formData': | ||
requestParams.form = sampleData; | ||
break; | ||
} | ||
@@ -59,0 +59,0 @@ }); |
{ | ||
"name": "swagger-police", | ||
"version": "0.0.5-beta", | ||
"version": "0.0.6-beta", | ||
"description": "Automatically validates the APIs against the published swagger specification", | ||
@@ -9,2 +9,3 @@ "bin": { | ||
"scripts": { | ||
"check": "npm run lint && npm test", | ||
"lint": "eslint .", | ||
@@ -36,4 +37,5 @@ "test": "node $NODE_DEBUG_OPTION build-tools/jasmine.js JASMINE_CONFIG_PATH=jasmine.json" | ||
"jasmine-promise-tools": "^1.0.5", | ||
"jasmine-reporters": "^2.2.0" | ||
"jasmine-reporters": "^2.2.0", | ||
"proxyquire": "^1.7.11" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39737
22
751
6