Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sans-server-swagger

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sans-server-swagger - npm Package Compare versions

Comparing version 0.3.13 to 0.3.14

5

bin/normalize-request.js

@@ -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 @@

8

package.json
{
"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 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc