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.43k
stars
228
forks
source link
Trailing slashes get automatically removed by AWS API Gateway, but swagger-ui-express requires it. #335
Trailing slashes get automatically removed by AWS API Gateway, but swagger-ui-express requires it. Page displays "Redirecting to /docs/" and not swagger UI.
I tried changing:
app.use('/docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec));
to
app.use('/docs/', swaggerUi.serve, swaggerUi.setup(swaggerSpec));
Trailing slashes get automatically removed by AWS API Gateway, but swagger-ui-express requires it. Page displays "Redirecting to /docs/" and not swagger UI.
I tried changing:
app.use('/docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec)); to app.use('/docs/', swaggerUi.serve, swaggerUi.setup(swaggerSpec));
...but neither work.