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.
<PackageVersion Include="AsyncAPI.Saunter.Generator.Build" Version="1.0.3-beta" />
                    
Directory.Packages.props
<PackageReference Include="AsyncAPI.Saunter.Generator.Build">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version 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.
#:package AsyncAPI.Saunter.Generator.Build@1.0.3-beta
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AsyncAPI.Saunter.Generator.Build&version=1.0.3-beta&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=AsyncAPI.Saunter.Generator.Build&version=1.0.3-beta&prerelease
                    
Install as a Cake Tool

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 12,439 7/13/2024