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

add option to generate custom server based on user templates

Open marcos10soares opened this issue 3 years ago • 0 comments

The goal of this PR is to add the option to use "user provided" templates without depending on a specific framework, by using the new option custom-server.

Objectives:

  • when calling oapi-codegen user provides a folder with multiple template files, the number of files or names do not matter
  • all the files should get parsed and the result returned as a single file

Non goals

  • support multiple file output (I tried this but it changed the current implementation too much) 🥲

This is useful when you want to create custom/private implementations (in my case, based on httprouter) that are too opinionated to be used by other people.

marcos10soares avatar Aug 19 '22 14:08 marcos10soares