swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

nodejs and express middleware

Open rajeget opened this issue 9 years ago • 15 comments
trafficstars

The codegen server stub , creates the 'connect' middleware . Is there a way to create express middleware. Express is more popular . If yes, howto . If no, can I put a request for it ?

Thanks _Raje

rajeget avatar Feb 21 '16 06:02 rajeget

There is not, but many have asked. Let's keep this open to track the issue.

fehguy avatar Feb 21 '16 06:02 fehguy

I kind of worked around , replaced : app = require('connect')(); replaced with : app = require('express')(); And ofcouse installed express .

This seems to have worked . Will review it for more route/validate etc . If that works will contribute this small alternation to the project.

If someone already have idea - as to if I am going in wrong direction please correct. Can contribute a better express server stub . But would require guidance.

-Raje

rajeget avatar Feb 21 '16 06:02 rajeget

Thanks! I can help integrate your changes into the templates and make it selectable from the generator. Just let me know how your testing goes and share your package.json and change to the js file

fehguy avatar Feb 21 '16 16:02 fehguy

@rajegit did you end up using Express or Connect? And how did it work out for you?

FilipHarald avatar Jan 04 '17 13:01 FilipHarald

@FilipHarald if you've time to work on the NodeJS express generator, please let me know and we can work together on that.

wing328 avatar Jan 13 '17 16:01 wing328

@wing328 unfortunately I do not have time at the moment. I ended up using swaggerize-express instead. Thank you for inviting me to contribute anyways!

FilipHarald avatar Jan 19 '17 19:01 FilipHarald

@FilipHarald np and thanks for sharing swaggerize-express, which looks good. I'll give it a try as well.

wing328 avatar Jan 20 '17 03:01 wing328

FWIW, we provide a swagger-to-server-models generator in LoopBack, our API framework built on top of express. See https://loopback.io/doc/en/lb2/Swagger-generator.html to get started.

bajtos avatar Apr 03 '17 10:04 bajtos

Hello! Is there any update on this?

linuxbandit avatar Sep 28 '18 20:09 linuxbandit

+1

Vichy97 avatar Oct 09 '18 21:10 Vichy97

hi @linuxbandit @Vichy97 it seems this ticket is a bit forgotten. i'm just starting to get involve with nodejs but i'm pretty familiar with codegen. if you guys guide me for the expected output i could help you with a solution for this.

HugoMario avatar Oct 09 '18 21:10 HugoMario

Hi guys, Any update on this? Looking for a server stub generation with express, I was surprised to see its not already available out of the box

dushansilva avatar Sep 29 '19 07:09 dushansilva

Any news on this one?

jydenberg avatar May 27 '20 19:05 jydenberg

any updates here?

abiriadev avatar Aug 24 '22 16:08 abiriadev

Is there any plan to implement ExpressJs here?

maxbec avatar Sep 20 '22 06:09 maxbec

Hello, any news about express support in 2023?

mnesarco avatar Mar 22 '23 22:03 mnesarco