Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Mar 21, 2019
1 parent 7943376 commit c21e000
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ npm i express-middleware-openapi

see [app.ts](test/app.ts) for an example.

### Basic

```javascript
new OpenApiMiddleware({
apiSpecPath: './openapi.yaml',
enableObjectCoercion: true, // should be default
}).install(app);
```

### Advanced

```javascript
new OpenApiMiddleware({
apiSpecPath: './openapi.yaml',
Expand Down Expand Up @@ -59,7 +70,6 @@ app.use(express.static(path.join(__dirname, 'public')));

new OpenApiMiddleware({
apiSpecPath: './openapi.yaml',
validateApiDoc: true, // default
enableObjectCoercion: true, // will be default
}).install(app);

Expand Down

0 comments on commit c21e000

Please sign in to comment.