sans-server-swagger
Advanced tools
Comparing version 0.3.13 to 0.3.14
@@ -37,7 +37,8 @@ /** | ||
const bodyHasDefault = param.schema && param.schema.hasOwnProperty('default'); | ||
if (typeof req.body === 'undefined' && bodyHasDefault) { | ||
const bodyType = typeof req.body; | ||
if (bodyType === 'undefined' && bodyHasDefault) { | ||
req.body = copy(param.schema.default); | ||
server.log('req-params', 'Using default value for parameter ' + name); | ||
} | ||
req.body = deserializeParameter(server, name, req.body, param.schema); | ||
if (bodyType !== 'object') req.body = deserializeParameter(server, name, req.body, param.schema); | ||
break; | ||
@@ -44,0 +45,0 @@ |
{ | ||
"name": "sans-server-swagger", | ||
"version": "0.3.13", | ||
"version": "0.3.14", | ||
"description": "Sans-Server middleware that uses swagger documents to define routes, validate requests, validate responses, and to produce mocks.", | ||
@@ -25,5 +25,5 @@ "main": "index.js", | ||
"chai": "^3.5.0", | ||
"coveralls": "^2.11.15", | ||
"mocha": "^3.5.0", | ||
"nyc": "^10.1.2", | ||
"coveralls": "^3.0.1", | ||
"mocha": "^5.1.1", | ||
"nyc": "^11.7.1", | ||
"sans-server": "^1.2.0" | ||
@@ -30,0 +30,0 @@ }, |
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
167598
37
2842