Skip to content

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

License

Notifications You must be signed in to change notification settings

Bharath-dev05/generator

 
 

Repository files navigation

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: This library contains generator filters that can be reused across multiple templates, helping to avoid redundant work. 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. Nunjucks-filters: This library contains generator filters that can be reused across multiple templates, helping to avoid redundant work. These filters are designed specifically for Nunjucks templates and are included by default with the generator, so there's no need to add them to dependencies separately.

npm npm

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

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

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

Filters

apps/nunjucks-filters library contains generator filters that can be reused across multiple templates, helping to avoid redundant work. These filters are designed specifically for Nunjucks templates and are included by default with the generator, so there's no need to add them to dependencies separately.

This library consists of:

  • Custom filters. Check out API docs for complete list
  • Lodash-powered filters. For the list of all available filters check official docs

Hooks

The apps/hooks library contains generator filters that can be reused across multiple templates, helping to avoid redundant work. 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):

Fran Méndez
Fran Méndez

💬 🐛 💻 📖 🤔 🚧 🔌 👀 ⚠️
Jonas Lagoni
Jonas Lagoni

💬 🐛 💻 📖 🤔 🔌 👀 ⚠️
Lukasz Gornicki
Lukasz Gornicki

💬 🐛 📝 💻 📖 🤔 🚧 🔌 👀 ⚠️ 🚇
Travis Reeder
Travis Reeder

🚇 📖
Semen
Semen

🐛 💻 📖 🤔 🔌 👀 ⚠️
Waleed Ashraf
Waleed Ashraf

💻 🐛
Sebastián
Sebastián

💻
Derk Muenchhausen
Derk Muenchhausen

💻
Ben Timby
Ben Timby

💻
Amanda  Shafack
Amanda Shafack

📖
Florence Njeri
Florence Njeri

📖 👀 🚇 🚧
Pratik Haldankar
Pratik Haldankar

📖 👀 🚧 📢
swastik suvam singh
swastik suvam singh

💻
GavinZhengOI
GavinZhengOI

📖
lmgyuan
lmgyuan

📖
pierrick-boule
pierrick-boule

💻 ⚠️ 📖
Dhairya Majmudar
Dhairya Majmudar

🐛

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

About

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

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 96.5%
  • Shell 2.0%
  • Handlebars 1.1%
  • Dockerfile 0.4%