Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Dec 30, 2019
1 parent 80b6d4f commit 842ae9e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ new OpenApiValidator(options).install({
},
ignorePaths: /.*\/pets$/,
unknownFormats: ['phone-number', 'uuid'],
multerOpts: { ... },
fileUploader: { ... } | true | false,
$refParser: {
mode: 'bundle'
}
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 842ae9e

Please sign in to comment.