
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
asyncapi-generator
Advanced tools
The AsyncAPI generator. It can generate documentation, code, anything!
Use your AsyncAPI definition to generate literally anything. Markdown documentation, Node.js code, HTML documentation, anything!
:warning: 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.
npm install -g asyncapi-generator
Or just use Docker:
docker run --rm -it \
-v [ASYNCAPI FILE LOCATION]:/app/asyncapi.yml \
-v [GENERATED FILES LOCATION]:/app/output \
asyncapi/generator [COMMAND HERE]
# Example that you can run inside generator directory after cloning this repository. First you specify mount in location of your AsyncAPI file and then you mount in directory where generation result should be saved.
docker run --rm -it \
-v ${PWD}/test/docs/streetlights.yml:/app/asyncapi.yml \
-v ${PWD}/output:/app/output \
asyncapi/generator -o ./output asyncapi.yml markdown
Usage: ag [options] <asyncapi> <template>
Options:
-V, --version output the version number
-w, --watch watches the templates directory and the AsyncAPI document for changes, and re-generate the files when they occur
-o, --output <outputDir> directory where to put the generated files (defaults to current directory)
-d, --disable-hook <hookName> disable a specific hook
-n, --no-overwrite <glob> glob or path of the file(s) to skip when regenerating
-p, --param <name=value> additional param to pass to templates
-t, --templates <templateDir> directory where templates are located (defaults to internal templates directory)
--force-install forces the installation of the template dependencies. By default, dependencies are installed and this flag is taken into account only if `node_modules` is not in place.
-h, --help output usage information
--force-write force writing of the generated files to given directory even if it is a git repo with unstaged files or not empty dir (defaults to false)
Please check out the templates directory to get a list of the supported languages/formats.
The shortest possible syntax:
ag asyncapi.yaml markdown
Specify where to put the result:
ag -o ./docs asyncapi.yaml markdown
Passing parameters to templates:
ag -o ./docs --param title='Hello from param' asyncapi.yaml markdown
In the template you can use it like this: {{ params.title }}
See API documentation.
See authoring templates and the list of templates recipes.
Contributions are more than welcome. If you want to contribute, please make sure you go through the following steps:
master
branch.Fran Méndez (@fmvilas)
FAQs
The AsyncAPI generator. It can generate documentation, code, anything!
The npm package asyncapi-generator receives a total of 125 weekly downloads. As such, asyncapi-generator popularity was classified as not popular.
We found that asyncapi-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.