Custom Templates
You can override the default templates to customize the generated code.
Template Engine
We use Mustache (Java) or Jinja2 (Python) depending on the generator core.
Overriding Templates
- Create a
.apigen/templatesdirectory in your project. - Place files with the same name as the original templates (e.g.,
controller.java.mustache). - APiGen will prioritize your local templates.
Structure
text
my-project/
.apigen/
templates/
java/
controller.mustache
service.mustache