From 5e207310d0d4cc2296e9328c508b8e42817904e8 Mon Sep 17 00:00:00 2001 From: Carmine DiMascio Date: Thu, 24 Oct 2019 11:28:49 -0400 Subject: [PATCH] Update README.md --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 7d921892..35e4cc66 100644 --- a/README.md +++ b/README.md @@ -520,19 +520,19 @@ 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 - app.use('/', swaggerUi.serve, swaggerUi.setup(documentation)) - - new OpenApiValidator({ - apiSpec: documentation, - validateResponses: true, - securityHandlers: { - bearerAuth: (req, scopes, schema) => { - console.log(req, scopes, schema) - } - } - }).install(app) - ``` + ```javascript + app.use('/', swaggerUi.serve, swaggerUi.setup(documentation)) + + new OpenApiValidator({ + apiSpec: documentation, + validateResponses: true, + securityHandlers: { + bearerAuth: (req, scopes, schema) => { + console.log(req, scopes, schema) + } + } + }).install(app) + ``` ## Contributors ✨ Contributions welcome! Here's how to [contribute](CONTRIBUTING.md).