Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cdimascio committed Oct 24, 2019
1 parent 5e20731 commit 708e8ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,11 @@ that are _not_ under the base URL—such as pages—will not be validated.
**A:** Yes. Be sure to add the swagger serve middleware prior to installing the OpenApiValidator. This will ensure that `swagger-ui-express` is able to fully prepare the spec before before OpenApiValidator attempts to use it.

```javascript
const swaggerUi = require('swagger-ui-express')
const OpenApiValidator = require('express-openapi-validator').OpenApiValidator
...
app.use('/', swaggerUi.serve, swaggerUi.setup(documentation))
new OpenApiValidator({
Expand Down

0 comments on commit 708e8ad

Please sign in to comment.