AsyncAPI.Saunter.Generator.Cli 1.0.3-beta

This is a prerelease version of AsyncAPI.Saunter.Generator.Cli.
dotnet tool install --global AsyncAPI.Saunter.Generator.Cli --version 1.0.3-beta                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local AsyncAPI.Saunter.Generator.Cli --version 1.0.3-beta                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=AsyncAPI.Saunter.Generator.Cli&version=1.0.3-beta&prerelease                
nuke :add-package AsyncAPI.Saunter.Generator.Cli --version 1.0.3-beta                

AsyncApi Generator.Cli Tool

A dotnet tool to generate AsyncAPI specification files based of a dotnet assembly (The application itself).

This tool can used to manually generate spec files from a startup assembly or to setup a custom build pipeline. If you are intressed in always generating spec files at build time, see AsyncAPI.Saunter.Generator.Build.

Tool usage

dotnet asyncapi tofile [startup-assembly] --output [output-path] --format [json,yml,yaml] --doc [asyncapi-document-name]
  • startup-assembly: the file path to the dotnet startup assembly (DLL) that hosts AsyncAPI document(s).

Tool options

  • --doc: The name of the AsyncAPI document as defined in the startup class by the .ConfigureNamedAsyncApi()-method. If only .AddAsyncApiSchemaGeneration() is used, the document is unnamed and will always be exported. If not specified, all documents will be exported.
  • --output: relative path where the AsyncAPI documents will be exported to (Default: the csproj root "./").
  • --filename: the template for the outputted file names (Default: "{document}_asyncapi.{extension}").
  • --format: the output formats to generate, can be a combination of json, yml and/or yaml (Default: "json").
  • --env: define environment variable(s) for the application. Formatted as a comma separated list of key=value pairs, example: ASPNETCORE_ENVIRONMENT=AsyncAPI,CONNECT_TO_DATABASE=false.

Install the Generator.Cli dotnet Tool

dotnet tool install --global AsyncAPI.Saunter.Generator.Cli

After installing the tool globally, it is available using commands: dotnet asyncapi or dotnet-asyncapi

Want to learn more about .NET tools? Or want to install it local using a manifest? Check out this Microsoft page on how to manage .NET tools

Internals

How does the tool work internally? It tries to exact an IServiceProvider from the provided startup-assembly and exports AsyncApiDocument(s) as registered with the services provider.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.3-beta 79 7/13/2024