Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Sep 8, 2019
1 parent 453c8e4 commit 9491a0a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,23 @@ const apiSpec = {
new OpenApiValidator({ apiSpec }).install(app);
```

## Options

```javascript
new OpenApiValidator(options).install(app);
```

**`apiSpec:`** a string value specifying the path to the OpenAPI 3.0.x spec or a JSON object representing an OpenAPI spec.

**`coerceTypes:`** change data type of data to match type keyword. See the example in Coercing data types and coercion rules. Option values:

- false (default) - no type coercion.
- true - coerce scalar data types.
- "array" - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema).

**`multerOpts:`** the [multer opts](https://github.com/expressjs/multer) to passthrough to multer


## Example Express API Server

Try the complete example below:
Expand Down

0 comments on commit 9491a0a

Please sign in to comment.