Add support for strict server with Gorilla#716
Conversation
|
Why not just use chi template and generate it for gorilla? There is no router-specific code in strict templates |
|
Agreed - there is no router-specific code in the Chi server template, so it could work in lieu of something Gorilla-specific. Currently, calling oapi-codegen with the |
|
Yeah, you can rename the template to strict-http and generate it for both chi and gorilla |
|
Sounds good. I've gone ahead and made the requested changes. |
|
This would close #714 if merged - thanks for raising, quick glance on mobile looks good, but will have a proper review later 🤞🏽 |
|
It looks like the generated files need to be regenerated for precommit to pass. |
* Create strict-gorilla.tmpl * Add Gorilla template * Abstract strict HTTP server * Regenerate samples Co-authored-by: Dwyer <dodwyer@ptc.com>
* Create strict-gorilla.tmpl * Add Gorilla template * Abstract strict HTTP server * Regenerate samples Co-authored-by: Dwyer <dodwyer@ptc.com>
This PR adds an extra template which supports strict server generation with Gorilla mux. The template is very similar to the Chi server template.