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

Open to new routers?

Open Jleagle opened this issue 4 years ago • 8 comments

Hi, i was thinking about adding Fiber https://github.com/gofiber/fiber as a server option, but before i started wanted to check if you are open to new server options?

Thanks.

Jleagle avatar Feb 19 '21 21:02 Jleagle

Absolutely, I also would like to add Gin support as well.

This code was an experiment, and as such, isn't very modular. I'd like to have a consistent type description available to templates, then allow anyone to add templates for any server. If you go down this path today, it'll get messy. If you're willing, please make a subdirectory in templates for fiber, and be aware that the data passed to the templates isn't always very stable.

deepmap-marcinr avatar Mar 22 '21 02:03 deepmap-marcinr

Fiber support would be great. Is anyone working on this?

kotyara85 avatar Aug 22 '21 17:08 kotyara85

Hello there.

Are there any prospects on this endeavour? I'm willing to help with the efforts.

TheProcedural avatar Mar 10 '22 12:03 TheProcedural

Also interested in helping out, are there any branches or efforts that have been committed to this repository so far?

princefishthrower avatar May 12 '22 21:05 princefishthrower

I didn't get far when i started this last year (project requirements changed). Probably better to start from scratch.

Jleagle avatar May 13 '22 08:05 Jleagle

Having a go at this again at https://github.com/Jleagle/oapi-codegen. Looked at the chi server for how to do it but it seems lots of deepmap code requires the standard http libs, which Fiber does not use.

go generate ./examples/petstore-expanded/fiber/... to generate.

Jleagle avatar Oct 24 '22 12:10 Jleagle

Having a go at this again at https://github.com/Jleagle/oapi-codegen. Looked at the chi server for how to do it but it seems lots of deepmap code requires the standard http libs, which Fiber does not use.

go generate ./examples/petstore-expanded/fiber/... to generate.

Nice! I've also done some work on this recently (and ran into similar challenges with the http libs you mentioned). If its to any help for you, my fork is available here https://github.com/four-fingers/oapi-codegen. We've used it for a couple of internal projects so far, but its not fully tested.

gnirb avatar Oct 24 '22 14:10 gnirb

@gnirb Awesome, thanks. That's very helpful.

Jleagle avatar Oct 28 '22 08:10 Jleagle