express-openapi-validator
Advanced tools
Comparing version 0.41.0 to 0.52.1
import { Application } from 'express'; | ||
export interface OpenApiValidatorOpts { | ||
apiSpecPath: string; | ||
multerOpts?: {}; | ||
} | ||
@@ -8,4 +9,5 @@ export declare class OpenApiValidator { | ||
private context; | ||
private multerOpts; | ||
constructor(options: OpenApiValidatorOpts); | ||
install(app: Application): void; | ||
} |
@@ -12,2 +12,3 @@ "use strict"; | ||
throw ono_1.default('apiSpecPath required'); | ||
this.multerOpts = options.multerOpts; | ||
const openApiContext = new openapi_context_1.OpenApiContext({ apiDoc: options.apiSpecPath }); | ||
@@ -38,3 +39,3 @@ const opts = { | ||
} | ||
app.use(middlewares.applyOpenApiMetadata(this.context), middlewares.validateRequest({ | ||
app.use(middlewares.applyOpenApiMetadata(this.context), middlewares.multipart(this.context, this.multerOpts), middlewares.validateRequest({ | ||
apiDoc: this.context.apiDoc, | ||
@@ -41,0 +42,0 @@ loggingKey, |
export { applyOpenApiMetadata } from './openapi.metadata'; | ||
export { validateRequest } from './openapi.request.validator'; | ||
export { multipart } from './openapi.multipart'; |
@@ -7,2 +7,4 @@ "use strict"; | ||
exports.validateRequest = openapi_request_validator_1.validateRequest; | ||
var openapi_multipart_1 = require("./openapi.multipart"); | ||
exports.multipart = openapi_multipart_1.multipart; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "express-openapi-validator", | ||
"version": "0.41.0", | ||
"version": "0.52.1", | ||
"description": "", | ||
@@ -29,2 +29,3 @@ "main": "dist/index.js", | ||
"lodash": "^4.17.11", | ||
"multer": "^1.4.1", | ||
"ono": "^5.0.1", | ||
@@ -31,0 +32,0 @@ "openapi-request-coercer": "^2.3.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
41428
27
861
11
+ Addedmulter@^1.4.1
+ Addedappend-field@1.0.0(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedbusboy@0.2.14(transitive)
+ Addedconcat-stream@1.6.2(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddicer@0.2.5(transitive)
+ Addedee-first@1.1.1(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisarray@0.0.11.0.0(transitive)
+ Addedmedia-typer@0.3.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedmulter@1.4.4(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedon-finished@2.4.1(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@1.1.142.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedstreamsearch@0.1.2(transitive)
+ Addedstring_decoder@0.10.311.1.1(transitive)
+ Addedtype-is@1.6.18(transitive)
+ Addedtypedarray@0.0.6(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedxtend@4.0.2(transitive)