diff --git a/README.md b/README.md index 4ecbddb6..bf65c692 100644 --- a/README.md +++ b/README.md @@ -336,7 +336,7 @@ new OpenApiValidator(options).install({ }, ignorePaths: /.*\/pets$/, unknownFormats: ['phone-number', 'uuid'], - multerOpts: { ... }, + fileUploader: { ... } | true | false, $refParser: { mode: 'bundle' } @@ -454,10 +454,22 @@ Defines how the validator should behave if an unknown or custom format is encoun - `"ignore"` - to log warning during schema compilation and always pass validation. This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. -### ▪️ multerOpts (optional) +### ▪️ fileUploader (optional) Specifies the options to passthrough to multer. express-openapi-validator uses multer to handle file uploads. see [multer opts](https://github.com/expressjs/multer) +- `true` (**default**) - enables multer and provides simple file(s) upload capabilities +- `false` - disables file upload capability. Upload capabilities may be provided by the user +- `{...}` - multer options to be passed-through to multer. see [multer opts](https://github.com/expressjs/multer) for possible options + + e.g. + + ```javascript + fileUploader: { + dest: 'uploads/'; + } + ``` + ### ▪️ coerceTypes (optional) Determines whether the validator should coerce value types to match the type defined in the OpenAPI spec.