Add templated supporting files by config
It would be great to be able to add custom supporting files by config when using an alternate template dir Eg.
{
"additionalSupportingFiles": {
"myCustomClass.mustache": "src/main/java/com/company/myapp/myCustomClass.java"
}
}
@cbornet ... I have raised issue #2047. Are you suggesting the same? We are using config and for alternate template path we required to extend DefaultCodeGenerator.
@cbornet do you mind sharing with me a bit more about your use case of adding additional files to be used by Codegen? Currently do you have any workaround for this limitation?
Of course. For instance I use a template to adapt the feign generator to Spring-Boot, generating automatically some beans for the apiclient and the apis that the user can then inject wherever he wants with Spring DI. With the current implementation, I cannot create new files so I have to put everything in ApiClient with nested classes. It would be easier and make the code more readable if I could create more classes.
Here is my templated ApiClient for reference.
Has this feature been added? This would be very useful!
PR: https://github.com/swagger-api/swagger-codegen/pull/6487/files