Skip to content

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 ​

  1. Create a .apigen/templates directory in your project.
  2. Place files with the same name as the original templates (e.g., controller.java.mustache).
  3. APiGen will prioritize your local templates.

Structure ​

text
my-project/
  .apigen/
    templates/
      java/
        controller.mustache
        service.mustache

Released under the MIT License.