Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/asyncapi/generator

Use your AsyncAPI definition to generate literally anything. Markdown documentation, Node.js code, HTML documentation, anything!
https://github.com/asyncapi/generator

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

Last synced: 4 days ago
JSON representation

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

Awesome Lists containing this project

README

        

[![AsyncAPI Generator](./assets/readme-banner.png)](https://www.asyncapi.com/tools/generator)

This is a Monorepo managed using [Turborepo](https://turbo.build/) and contains the following package:

1. [Generator](apps/generator): This is a tool that you can use to generate whatever you want basing on the AsyncAPI specification file as an input.

1. [Hooks](apps/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.

1. [Nunjucks-filters](apps/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](https://img.shields.io/npm/v/@asyncapi/generator?style=for-the-badge) ![npm](https://img.shields.io/npm/dt/@asyncapi/generator?style=for-the-badge)

- [Overview](#overview)
- [List of official generator templates](#list-of-official-generator-templates)
- [Filters](#filters)
- [Hooks](#hooks)
- [Contributing](#contributing)
- [Contributors ✨](#contributors-%E2%9C%A8)

## 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](https://www.asyncapi.com/docs/tools/generator).

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](https://github.com/asyncapi/nodejs-template) |
| `@asyncapi/nodejs-ws-template` | Generates Nodejs service that supports WebSockets protocol only | [click here](https://github.com/asyncapi/nodejs-ws-template) |
| `@asyncapi/java-template` | Generates Java JMS application | [click here](https://github.com/asyncapi/java-template) |
| `@asyncapi/java-spring-template` | Generates Java Spring service | [click here](https://github.com/asyncapi/java-spring-template) |
| `@asyncapi/java-spring-cloud-stream-template` | Generates Java Spring Cloud Stream service | [click here](https://github.com/asyncapi/java-spring-cloud-stream-template) |
| `@asyncapi/python-paho-template` | Generates Python service that uses Paho library | [click here](https://github.com/asyncapi/python-paho-template) |
| `@asyncapi/html-template` | Generates HTML documentation site | [click here](https://github.com/asyncapi/html-template) |
| `@asyncapi/markdown-template` | Generates documentation in Markdown file | [click here](https://github.com/asyncapi/markdown-template) |
| `@asyncapi/ts-nats-template` | Generates TypeScript NATS client | [click here](https://github.com/asyncapi/ts-nats-template/) |
| `@asyncapi/go-watermill-template` | Generates Go client using Watermill | [click here](https://github.com/asyncapi/go-watermill-template) |
| `@asyncapi/dotnet-nats-template` | Generates .NET C# client using NATS | [click here](https://github.com/asyncapi/dotnet-nats-template) |
| `@asyncapi/php-template` | Generates PHP client using RabbitMQ | [click here](https://github.com/asyncapi/php-template) |
| `@asyncapi/dotnet-rabbitmq-template` | Generates .NET C# client using RabbitMQ | [click here](https://github.com/asyncapi/dotnet-rabbitmq-template) |

You can find above templates and the ones provided by the community in **[this list](https://github.com/search?q=topic%3Aasyncapi+topic%3Agenerator+topic%3Atemplate)**

## 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](apps/nunjucks-filters/docs/api.md) for complete list
- Lodash-powered filters. For the list of all available filters check [official docs](https://lodash.com/docs/)

## Hooks

The `apps/hooks` library contains generator filters that can be reused across multiple templates, helping to avoid redundant work. [Hooks](https://www.asyncapi.com/docs/tools/generator/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](https://www.asyncapi.com/docs/tools/generator/hooks#official-library).

## Contributing

For the development setup, you can follow the detailed guide in [Developement guide](Development.md)

Read [CONTRIBUTING](CONTRIBUTING.md) guide.

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/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](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!