Skip to content

Commit

Permalink
fix: remove host option from export swagger docs (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinccbsg committed Aug 3, 2021
1 parent 1e10e91 commit e29dc5c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
});
}

Expand Down

0 comments on commit e29dc5c

Please sign in to comment.