express-oas-generator icon indicating copy to clipboard operation
express-oas-generator copied to clipboard

Not working with my setup (express 5.0-alpha)

Open MoMannn opened this issue 2 years ago • 2 comments

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.

MoMannn avatar Sep 15 '21 11:09 MoMannn

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,

maxiejbe avatar Oct 04 '21 16:10 maxiejbe

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

sphinxrave avatar Jul 06 '22 03:07 sphinxrave