Socket
Socket
Sign inDemoInstall

express-openapi-validator

Package Overview
Dependencies
Maintainers
1
Versions
278
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-openapi-validator - npm Package Compare versions

Comparing version 0.53.3 to 1.0.0

22

package.json
{
"name": "express-openapi-validator",
"version": "0.53.3",
"description": "",
"version": "1.0.0",
"description": "Automatically validate API requests using an OpenAPI 3 and Express.",
"main": "dist/index.js",

@@ -41,6 +41,6 @@ "scripts": {

"@types/cookie-parser": "^1.4.1",
"@types/express": "^4.16.1",
"@types/mocha": "^5.2.6",
"@types/express": "^4.17.0",
"@types/mocha": "^5.2.7",
"@types/morgan": "^1.7.35",
"@types/node": "^11.13.11",
"@types/node": "^11.13.13",
"@types/supertest": "^2.0.7",

@@ -51,15 +51,15 @@ "body-parser": "^1.19.0",

"cookie-parser": "^1.4.4",
"coveralls": "^3.0.3",
"express": "^4.17.0",
"coveralls": "^3.0.4",
"express": "^4.17.1",
"mocha": "^6.1.4",
"morgan": "^1.9.1",
"nodemon": "^1.19.0",
"nodemon": "^1.19.1",
"nyc": "^13.3.0",
"prettier": "^1.17.1",
"prettier": "^1.18.2",
"source-map-support": "0.5.11",
"supertest": "^4.0.2",
"ts-node": "^8.1.0",
"ts-node": "^8.2.0",
"tsc": "^1.20150623.0",
"typescript": "^3.4.5"
"typescript": "^3.5.1"
}
}

@@ -85,2 +85,20 @@ # express-openapi-validator

// 4. Add a route upload file(s)
app.post('/v1/pets/:id/photos', function(req, res, next) {
// DO something with the file
// files are found in req.files
// non-file multipar params can be found as such: req.body['my-param']
console.log(req.files);
res.json({
files_metadata: req.files.map(f => ({
originalname: f.originalname,
encoding: f.encoding,
mimetype: f.mimetype,
// Buffer of file conents
// buffer: f.buffer,
})),
});
});
// 5. Create an Express error handler

@@ -87,0 +105,0 @@ app.use((err, req, res, next) => {

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