asyncapi/generator

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

JavaScript

1,082

1,537 commits

updated Oct 16, 2026

See the code

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 based 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 understands 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

Overview

Generator is a tool that you can use to generate whatever you want based 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

Template NameDescriptionSource code
@asyncapi/nodejs-template(archived) Generates Nodejs service that uses Hermes packageclick here
@asyncapi/nodejs-ws-template(archived) Generates Nodejs service that supports WebSockets protocol onlyclick here
@asyncapi/java-templateGenerates Java JMS applicationclick here
@asyncapi/java-spring-template(archived) Generates Java Spring serviceclick here
@asyncapi/java-spring-cloud-stream-templateGenerates Java Spring Cloud Stream serviceclick here
@asyncapi/python-paho-template(archived) Generates Python service that uses Paho libraryclick here
@asyncapi/html-templateGenerates HTML documentation siteclick here
@asyncapi/markdown-templateGenerates documentation in Markdown fileclick here
@asyncapi/ts-nats-template(archived) Generates TypeScript NATS clientclick here
@asyncapi/go-watermill-template(archived) Generates Go client using Watermillclick here
@asyncapi/dotnet-nats-template(archived) Generates .NET C# client using NATSclick here
@asyncapi/php-template(archived) Generates PHP client using RabbitMQclick here
@asyncapi/dotnet-rabbitmq-template(archived) Generates .NET C# client using RabbitMQclick here

[!NOTE] Templates marked (archived) live in the asyncapi-archived-repos organization and are no longer maintained. Consider the baked-in templates for supported alternatives.

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 the development documentation.

Read the Contributing guide.

If you use generative AI or AI-assisted tooling when contributing, read our AI Usage Policy first.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

asyncapi
codegen
codegenerator
documentation
generator
get-global-docs-autoupdate
get-global-holopin
get-global-prettierignore
hacktoberfest
nodejs

asyncapi/generator

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

JavaScript

1,082

1,537 commits

updated Oct 16, 2026

See the code

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 based 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 understands 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

Overview

Generator is a tool that you can use to generate whatever you want based 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

Template NameDescriptionSource code
@asyncapi/nodejs-template(archived) Generates Nodejs service that uses Hermes packageclick here
@asyncapi/nodejs-ws-template(archived) Generates Nodejs service that supports WebSockets protocol onlyclick here
@asyncapi/java-templateGenerates Java JMS applicationclick here
@asyncapi/java-spring-template(archived) Generates Java Spring serviceclick here
@asyncapi/java-spring-cloud-stream-templateGenerates Java Spring Cloud Stream serviceclick here
@asyncapi/python-paho-template(archived) Generates Python service that uses Paho libraryclick here
@asyncapi/html-templateGenerates HTML documentation siteclick here
@asyncapi/markdown-templateGenerates documentation in Markdown fileclick here
@asyncapi/ts-nats-template(archived) Generates TypeScript NATS clientclick here
@asyncapi/go-watermill-template(archived) Generates Go client using Watermillclick here
@asyncapi/dotnet-nats-template(archived) Generates .NET C# client using NATSclick here
@asyncapi/php-template(archived) Generates PHP client using RabbitMQclick here
@asyncapi/dotnet-rabbitmq-template(archived) Generates .NET C# client using RabbitMQclick here

[!NOTE] Templates marked (archived) live in the asyncapi-archived-repos organization and are no longer maintained. Consider the baked-in templates for supported alternatives.

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 the development documentation.

Read the Contributing guide.

If you use generative AI or AI-assisted tooling when contributing, read our AI Usage Policy first.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

asyncapi
codegen
codegenerator
documentation
generator
get-global-docs-autoupdate
get-global-holopin
get-global-prettierignore
hacktoberfest
nodejs

Project health

Overall

5.8/10

Maintained

10/10

Code review

10/10
OpenSSF Scorecard

Latest release

3.4.1 · Sep 17, 2026

Releases this year

14

Significant stargazers

tottoto

70 followers · starred Apr 2021

Howard Wu

585 followers · starred Jun 2025

Christine Belzie

555 followers · starred Jul 2025

James Thompson

23 followers · starred Mar 2024