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

pratik9315/generator

 
 

Repository files navigation

AsyncAPI Generator

npm npm

⚠️ This package doesn't support AsyncAPI 1.x anymore. We recommend to upgrade to the latest AsyncAPI version using the AsyncAPI converter. If you need to convert documents on the fly, you may use the Node.js or Go converters.

Overview

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

To specify what exactly must be generated you create so called template. To create your own template, go to section that explains How to create a template.

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

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

Requirements

  • Node.js v12.16 and higher
  • npm v6.13.7 and higher

Install both packages using official installer. After installation make sure both packages have proper version by running node -v and npm -v. To upgrade invalid npm version run npm install npm@latest -g

The generator is tested at the moment against Node 14 and NPM 6. Using newer versions is enabled but we don't guarantee they work well. Please provide feedback via issues.

Using from the command-line interface (CLI)

CLI installation

Learn to install the AsyncAPI CLI from the installation guide.

CLI usage

Learn more about different ways of using the CLI from the usage document.

Generator version vs Template version

Learn more about versioning from the versioning document.

How to create a template

To create your own template, for example code generator for some specific language and technology, learn from the following resources:

Contributing

Read CONTRIBUTING guide.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Fran Méndez

💬 🐛 💻 📖 🤔 🚧 🔌 👀 ⚠️

Jonas Lagoni

💬 🐛 💻 📖 🤔 🔌 👀 ⚠️

Lukasz Gornicki

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

Travis Reeder

🚇 📖

Semen

🐛 💻 📖 🤔 🔌 👀 ⚠️

Waleed Ashraf

💻 🐛

Sebastián

💻

Derk Muenchhausen

💻

Ben Timby

💻

Amanda Shafack

📖

Florence Njeri

📖 👀 🚇 🚧

Pratik Haldankar

📖 👀 🚧 📢

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

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.0%
  • Other 1.0%