From dd23ce932baa119b433fd463d4b71b24e6813fdf Mon Sep 17 00:00:00 2001 From: kevinccbsg Date: Wed, 4 Aug 2021 00:08:12 +0200 Subject: [PATCH] fix: remove host option from export swagger docs --- index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 821fb60..b834c0d 100644 --- a/index.js +++ b/index.js @@ -46,7 +46,12 @@ const expressJSDocSwagger = app => (userOptions = {}, userSwagger = {}) => { if (options.exposeApiDocs) { app.get(options.apiDocsPath, (req, res) => { - res.json(swaggerObject); + res.json({ + ...swaggerObject, + // we skipped this as is not a valid prop in OpenAPI + // This is only being used in the SwaggerUI Library + host: undefined, + }); }); }