Skip to content

[DOCS] document template helper autoloading #140

@p-mcgowan

Description

@p-mcgowan

It's possible for templates to include helper files which are automatically loaded by generate-it, but this is not documented anywhere:

public registerHelpers (tplDir: string): void {

Eg if you create in the templates .openapi-nodegen/helpers/myCustomHelper.js then it is automatically available in the templates:

<html>
  <head>{{ myCustomHelper }}</head>
  <body></body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions