This is a Monorepo managed using Turborepo and contains the following package:
-
Generator: This is a tool that you can use to generate whatever you want basing on the AsyncAPI specification file as an input.
-
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 seprately.
warning: This package doesn't support AsyncAPI 1.x anymore. We recommend to upgrade to the latest AsyncAPI version using the AsyncAPI converter (You can refer to installation guide). If you need to convert documents on the fly, you may use the Node.js or Go converters.
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.
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
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 seprately.
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
To release a major/minor/patch:
To maintain a clear git history of commits and easily identify what each commit changed and whether it triggered a release, we use conventional commits. The feat and fix prefixes are particularly important as they are needed to trigger changesets. Using these prefixes ensures that the changes are correctly categorized and the versioning system functions as expected.
For Example:
feat: add new feature
-
Create a new release markdown file in the
.changeset
directory. The filename should indicate what the change is about. -
Add the following content to the file in this particular format:
--- "@package-name-1": [type] (major/minor/patch) "@package-name-2": [type] --- [Provide a brief description of the changes. For example: Added a new Release GitHub Flow to the Turborepo. No new features or bugfixes were introduced.]
For Example:
--- "@asyncapi/generator": minor --- Adding new Release Github Flow to the Turborepo. No new features or bugfixes were introduced.
-
Include the file in your pull request.
-
Create a new release markdown file using changeset CLI. Below command will trigger an interactive prompt that you can use to specify release type and affected packages.
npx -p @changesets/[email protected] changeset
-
Include the file in your pull request.
Tip
For more detailed instructions, you can refer to the official documentation for creating a changeset: Adding a changeset
-
Add a Changeset:
- When you make changes that need to be released, create a markdown file in the
.changeset
directory stating the package name and level of change (major/minor/patch).
- When you make changes that need to be released, create a markdown file in the
-
Open a Pull Request:
- Push your changes and open a Pull Request (PR). After the PR is merged the changeset file helps communicate the type of changes (major, minor, patch).
-
CI Processes Changeset:
-
After PR is merged, a dedicated GitHub Actions release workflow runs using changeset action,
-
This action reads the markdown files in the
.changeset
folder and creates a PR with the updated version of the package and removes the markdown file. For example:Before:
"name": "@asyncapi/generator", "version": "2.0.1",
After:
"name": "@asyncapi/generator", "version": "3.0.1",
-
The new PR will also contain the description from the markdown files,
-
AsyncAPI bot automatically merge such release PR.
-
-
Release the Package:
- After the PR is merged, the CI/CD pipeline triggers again. The
changesets/action
step identifies that the PR was created by itself. It then verifies if the current version of the package is greater than the previously released version. If a difference is detected, it executes the publish command to release the updated package.
- After the PR is merged, the CI/CD pipeline triggers again. The
Read CONTRIBUTING guide.
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!