SkillAgentSearch skills...

Generator

Use your AsyncAPI definition to generate literally anything. Markdown documentation, Node.js code, HTML documentation, anything!

Install / Use

/learn @asyncapi/Generator

README

AsyncAPI Generator

This is a Monorepo managed using Turborepo and contains the following package:

  1. Generator: This is a tool that you can use to generate whatever you want basing on the AsyncAPI specification file as an input.

  2. Hooks: Hooks are designed to let template developers hook into the template generation process. For example, one can create a hook code that will be automatically invoked right after the template generation process has ended.

  3. React-sdk: AsyncAPI React SDK is a set of components/functions to use React as render engine for the generator. This is the library that undestand components from Generator's templates that are configured to use react render engine.

  4. Generator-helpers: A utility library that provides helper functions and utilities to simplify template development. It reduces boilerplate and speeds up template creation.

  5. Generator-components: A library of reusable components that can be shared across different templates, helping to avoid duplication and accelerate template development.

npm npm

<!-- toc is generated with GitHub Actions do not remove toc markers --> <!-- toc --> <!-- tocstop -->

Overview

Generator is a tool that you can use to generate whatever you want basing on the AsyncAPI specification file as an input. For more information read the docs.

There is a large number of templates that are ready to use and are officially supported by the AsyncAPI Initiative.

List of official generator templates

<!-- templates list is validated with GitHub Actions do not remove list markers --> <!-- TEMPLATES-LIST:START -->

| Template Name | Description | Source code | | --------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------- | | @asyncapi/nodejs-template | Generates Nodejs service that uses Hermes package | click here | | @asyncapi/nodejs-ws-template | Generates Nodejs service that supports WebSockets protocol only | click here | | @asyncapi/java-template | Generates Java JMS application | click here | | @asyncapi/java-spring-template | Generates Java Spring service | click here | | @asyncapi/java-spring-cloud-stream-template | Generates Java Spring Cloud Stream service | click here | | @asyncapi/python-paho-template | Generates Python service that uses Paho library | click here | | @asyncapi/html-template | Generates HTML documentation site | click here | | @asyncapi/markdown-template | Generates documentation in Markdown file | click here | | @asyncapi/ts-nats-template | Generates TypeScript NATS client | click here | | @asyncapi/go-watermill-template | Generates Go client using Watermill | click here | | @asyncapi/dotnet-nats-template | Generates .NET C# client using NATS | click here | | @asyncapi/php-template | Generates PHP client using RabbitMQ | click here | | @asyncapi/dotnet-rabbitmq-template | Generates .NET C# client using RabbitMQ | click here |

<!-- TEMPLATES-LIST:END -->

You can find above templates and the ones provided by the community in this list

[!IMPORTANT] Experimental Feature: AsyncAPI Generator also comes with baked-in templates - official templates shipped directly inside the Generator (@asyncapi/generator). They cover code, docs, configs, and SDKs, and are maintained under /packages/templates directory, following a strict, opinionated structure for consistency and ease of maintenance. This feature is not recommended for production use. For those who want to try them out or learn more, see the Baked-in templates documentation.

Hooks

Hooks are functions called by the generator at specific moments in the generation process. Hooks can be anonymous functions, but you can also assign them function names. These hooks can have arguments provided to them, or they may be expected to return a value.

These hooks are included in the generator without adding any specific dependency to the library. You still have to enable the given hook in the configuration explicitly because some hooks can execute automatically without passing a specific parameter. Learn more about configuration and what hooks are available out of the box.

Contributing

For the development setup, you can follow the detailed guide in Developement guide

Read CONTRIBUTING guide.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center" valign="top" width="33.33%"><a href="http://www.fmvilas.com"><img src="https://avatars3.githubusercontent.com/u/242119?v=4?s=100" width="100px;" alt="Fran Méndez"/><br /><sub><b>Fran Méndez</b></sub></a><br /><a href="#question-fmvilas" title="Answering Questions">💬</a> <a href="https://github.com/asyncapi/generator/issues?q=author%3Afmvilas" title="Bug reports">🐛</a> <a href="https://github.com/asyncapi/generator/commits?author=fmvilas" title="Code">💻</a> <a href="https://github.com/asyncapi/generator/commits?author=fmvilas" title="Documentation">📖</a> <a href="#ideas-fmvilas" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-fmvilas" title="Maintenance">🚧</a> <a href="#plugin-fmvilas" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/asyncapi/generator/pulls?q=is%3Apr+reviewed-by%3Afmvilas" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/asyncapi/generator/commits?author=fmvilas" title="Tests">⚠️</a> <a href="#tutorial-fmvilas" title="Tutorials">✅</a></td> <td align="center" valign="top" width="33.33%"><a href="https://github.com/jonaslagoni"><img src="https://avatars1.githubusercontent.com/u/13396189?v=4?s=100" width="100px;" alt="Jonas Lagoni"/><br /><sub><b>Jonas Lagoni</b></sub></a><br /><a href="#question-jonaslagoni" title="Answering Questions">💬</a> <a href="https://github.com/asyncapi/generator/issues?q=author%3Ajonaslagoni" title="Bug reports">🐛</a> <a href="https://github.com/asyncapi/generator/commits?author=jonaslagoni" title="Code">💻</a> <a href="https://github.com/asyncapi/generator/commits?author=jonaslagoni" title="Documentation">📖</a> <a href="#ideas-jonaslagoni" title="Ideas, Planning, & Feedback">🤔</a> <a href="#plugin-jonaslagoni" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/asyncapi/generator/pulls?q=is%3Apr+reviewed-by%3Ajonaslagoni" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/asyncapi/generator/commits?author=jonaslagoni" title="Tests">⚠️</a></td> <td align="center" valign="top" width="33.33%"><a href="https://resume.github.io/?derberg"><img src="https://avatars1.githubusercontent.com/u/6995927?v=4?s=100" width="100px;" alt="Lukasz Gornicki"/><br /><sub><b>Lukasz Gornicki</b></sub></a><br /><a href="#question-derberg" title="Answering Questions">💬</a> <a href="https://github.com/asyncapi/generator/issues?q=author%3Aderberg" title="Bug reports">🐛</a> <a href="#blog-derberg" title="Blogposts">📝</a> <a href="https://github.com/asyncapi/generator/commits?author=derberg" title="Code">💻</a> <a href="https://github.com/asyncapi/generator/commits?author=derberg" title="Documentation">📖</a> <a href="#ideas-derberg" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-derberg" title="Maintenance">🚧</a> <a href="#plugin-derberg" title="Plugin/utility libraries">🔌</a> <a href="https://github.c
View on GitHub
GitHub Stars1.0k
CategoryDevelopment
Updated20m ago
Forks381

Languages

JavaScript

Security Score

100/100

Audited on Mar 27, 2026

No findings