Skip to content

docs: correct template generation process steps #1489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/generator/docs/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ You can store template projects on a local drive or as a `git` repository during
## Template generation process

1. Template is provided as input to the **Generator**.
2. **asyncapi** is the original AsyncAPI document injected into your template file by default.
2. **asyncapi** (which is an instance of AsyncAPIDocument) is injected into your template file by default.
3. **params** are the parameters you pass to the AsyncAPI CLI. Later, you can also pass these **params** further to other components.
4. The generator passes both the original **asyncapi**, the original AsyncAPI document, and the **params** to the **Template Context**.
4. The generator passes both the **asyncapi**, the **originalAsyncAPI**, and the **params** to the **Template Context**.
5. Concurrently, the generator passes **Template files** to the **Render engine** as well. AsyncAPI uses two render engines — _react_ and _nunjucks_.
6. Once the Render Engine receives both the Template Files and the Template Context, it injects all the dynamic values into your react or nunjucks engine, based on the Template Files using the Template Context.
7. The render engine generates whatever output you may have specified in your template. (i.e. code, documentation, diagrams, pdfs, applications, etc.)
Expand Down