From 462cd4f7e7f4da885d31f8e5774b34bad0edfd32 Mon Sep 17 00:00:00 2001 From: Christian Georgi Date: Thu, 23 Feb 2023 15:29:15 +0100 Subject: [PATCH] Enhance docs --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index ee12244..2362ad4 100644 --- a/README.md +++ b/README.md @@ -321,6 +321,11 @@ var options = {} app.use('/api-docs-one', swaggerUi.serveFiles(swaggerDocumentOne, options), swaggerUi.setup(swaggerDocumentOne)); app.use('/api-docs-two', swaggerUi.serveFiles(swaggerDocumentTwo, options), swaggerUi.setup(swaggerDocumentTwo)); + +app.use('/api-docs-dynamic', function(req, res, next){ + req.swaggerDoc = swaggerDocument; + next(); +}, swaggerUi.serveFiles(), swaggerUi.setup()); ``` ### Link to Swagger document