Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your app.
MIT License
1.41k
stars
225
forks
source link
Defaulting to https://petstore.swagger.io/v2/swagger.json and CORS error #314
I have recently updated all my libs and not sure what changed but now the explorer bar is showing up and defaulting to https://petstore.swagger.io/v2/swagger.json, which tries to load this and causes a CORS error (even though I am using the express-cors module).
I would like it just to load my api definition and not have an explorer bar. I've tried many options - explorer:false, setting url, swaggerUrl, url in base yml file, etc. with no success.
I am loading my OpenAPI spec through openapi-comment-parser, based upon the suggestion in this issue. Here is my abbreviated code;
I have recently updated all my libs and not sure what changed but now the explorer bar is showing up and defaulting to https://petstore.swagger.io/v2/swagger.json, which tries to load this and causes a CORS error (even though I am using the express-cors module).
I would like it just to load my api definition and not have an explorer bar. I've tried many options -
explorer:false,
settingurl
,swaggerUrl
, url in base yml file, etc. with no success.Any suggestions would be appreciated!