swagger-codegen
swagger-codegen copied to clipboard
Override template path
PR checklist
- [X] Read the contribution guildelines.
- [X] Ran the shell/batch script under
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates) - [X] Filed the PR against the correct branch: master for non-breaking changes and
2.3.0branch for breaking (non-backward compatible) changes.
Description of the PR
I found the need to subclass a concrete language generator including the templates with the need to be able to inject partial templates from the subclass. This PR provides a means to enable a derived generator to route the template file look up to an arbitrary template location based on the name of the template. I then added some partial template tags and placeholder mustache files into the csharp client generator to enable subclasses to add packages/references to the generated project. I also added a ApiClient (also csharp) virtual method to intercept deserialization of models.