AsyncAPI.Saunter.Generator.Build 1.0.3-beta

This is a prerelease version of AsyncAPI.Saunter.Generator.Build.
dotnet add package AsyncAPI.Saunter.Generator.Build --version 1.0.3-beta                
NuGet\Install-Package AsyncAPI.Saunter.Generator.Build -Version 1.0.3-beta                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AsyncAPI.Saunter.Generator.Build" Version="1.0.3-beta">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AsyncAPI.Saunter.Generator.Build --version 1.0.3-beta                
#r "nuget: AsyncAPI.Saunter.Generator.Build, 1.0.3-beta"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AsyncAPI.Saunter.Generator.Build as a Cake Addin
#addin nuget:?package=AsyncAPI.Saunter.Generator.Build&version=1.0.3-beta&prerelease

// Install AsyncAPI.Saunter.Generator.Build as a Cake Tool
#tool nuget:?package=AsyncAPI.Saunter.Generator.Build&version=1.0.3-beta&prerelease                

AsyncApi Generator.Build Nuget Package

A nuget package to generate AsyncAPI specification files at build time, based on code-first attributes. This nuget package requires .NET8.0 runtime in order to work. The consuming csproj doesn't need to target .NET8.0.

This nuget packages can help to better control API changes by commiting the AsyncAPI spec to source control. By always generating spec files at build, it will be clear when the api changes.

Customization Properties

The AsyncAPI spec generation can be configured through project properties in the csproj-file (or included via .props files):

  <PropertyGroup>
    <AsyncAPIGenerateDocumentsOnBuild></AsyncAPIGenerateDocumentsOnBuild>
    <AsyncAPIDocumentFormats></AsyncAPIDocumentFormats>
    <AsyncAPIDocumentOutputPath></AsyncAPIDocumentOutputPath>
    <AsyncAPIDocumentNames></AsyncAPIDocumentNames>
    <AsyncAPIDocumentFilename></AsyncAPIDocumentFilename>
    <AsyncAPIDocumentEnvVars></AsyncAPIDocumentEnvVars>
  </PropertyGroup>

Defaults are the same as the underlying Generator.Cli tool.

If the AsyncAPI.Saunter.Generator.Build Nuget package is referenced, the default is to generate AsyncAPI spec files at build time.

  • AsyncAPIGenerateDocumentsOnBuild: Whether to actually generate AsyncAPI spec files on build (true or false, default: true)
  • AsyncAPIDocumentFormats: the output formats to generate, can be a combination of json, yml and/or yaml.
  • AsyncAPIDocumentOutputPath: relative path where the AsyncAPI will be output (default is the csproj root path: ./)
  • AsyncAPIDocumentNames: The AsyncAPI documents to generate. (default: generate all known documents)
  • AsyncAPIDocumentFilename: the template for the outputted file names. Default: "{document}_asyncapi.{extension}"
  • AsyncAPIDocumentEnvVars: 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.

None of these properties are mandatory. Only referencing the AsyncAPI.Saunter.Generator.Build Nuget package will generate a json AsyncAPI spec file for all AsyncAPI documents.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3-beta 1,917 7/13/2024