express-oas-generator
express-oas-generator copied to clipboard
Not working with my setup (express 5.0-alpha)
I cannot get the generator to work and I'm not sure if the problem is the express version I am using (5.0 alpha) or maybe my server structure.
I created an example demonstrating my error: https://github.com/MoMannn/express-oas-generator-example
Just run npm run start
.
Hi @MoMannn,
I've not tested it again Express 5.0 as it's still alpha, let me give it a try. But if it doesn't work any version we ship will probably break backwards compatibility and requires shipping a major @mpashkovskiy.
Best,
Can confirm it doesn't work against express 5.0
Some fixes:
var stack = app.stack || (app.router && app.router.stack)
express doesn't have app._router
anymore, so we have to use .router
However, it still doesn't work as it doesn't go through the tree correctly, only /leafURL show up in the generated swagger doc, instead of /branch/leafURL