oapi-codegen
oapi-codegen copied to clipboard
Open to new routers?
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.
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.
Fiber support would be great. Is anyone working on this?
Hello there.
Are there any prospects on this endeavour? I'm willing to help with the efforts.
Also interested in helping out, are there any branches or efforts that have been committed to this repository so far?
I didn't get far when i started this last year (project requirements changed). Probably better to start from scratch.
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.
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 Awesome, thanks. That's very helpful.