express-openapi-validator
Advanced tools
Comparing version 1.0.0 to 1.1.0
{ | ||
"name": "express-openapi-validator", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Automatically validate API requests using an OpenAPI 3 and Express.", | ||
@@ -32,3 +32,3 @@ "main": "dist/index.js", | ||
"openapi-request-coercer": "^2.3.0", | ||
"openapi-request-validator": "^3.8.1", | ||
"openapi-request-validator": "^3.8.3", | ||
"openapi-schema-validator": "^3.0.3", | ||
@@ -35,0 +35,0 @@ "openapi-security-handler": "^2.0.4", |
@@ -43,2 +43,3 @@ # express-openapi-validator | ||
Try the complete example below: | ||
(_it includes file upload as well!_) | ||
@@ -86,8 +87,6 @@ ```javascript | ||
// 4. Add a route upload file(s) | ||
// 4. Define route(s) to 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); | ||
// non-file multipart params can be found as such: req.body['my-param'] | ||
@@ -100,3 +99,3 @@ res.json({ | ||
// Buffer of file conents | ||
// buffer: f.buffer, | ||
buffer: f.buffer, | ||
})), | ||
@@ -103,0 +102,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
43248
221