AsyncAPI.NET.Bindings 5.2.0-beta.74

This is a prerelease version of AsyncAPI.NET.Bindings.
There is a newer version of this package available.
See the version list below for details.
dotnet add package AsyncAPI.NET.Bindings --version 5.2.0-beta.74
                    
NuGet\Install-Package AsyncAPI.NET.Bindings -Version 5.2.0-beta.74
                    
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.NET.Bindings" Version="5.2.0-beta.74" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AsyncAPI.NET.Bindings" Version="5.2.0-beta.74" />
                    
Directory.Packages.props
<PackageReference Include="AsyncAPI.NET.Bindings" />
                    
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.NET.Bindings --version 5.2.0-beta.74
                    
#r "nuget: AsyncAPI.NET.Bindings, 5.2.0-beta.74"
                    
#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.
#addin nuget:?package=AsyncAPI.NET.Bindings&version=5.2.0-beta.74&prerelease
                    
Install AsyncAPI.NET.Bindings as a Cake Addin
#tool nuget:?package=AsyncAPI.NET.Bindings&version=5.2.0-beta.74&prerelease
                    
Install AsyncAPI.NET.Bindings as a Cake Tool

alternate text is missing from this package README image

AsyncAPI.NET

GitHub Workflow Status

The AsyncAPI.NET SDK contains a useful object model for the AsyncAPI specification in .NET along with common serializers to extract raw AsyncAPI JSON and YAML documents from the model as well.

CHANGELOG
Wiki and getting started guide

Installation

Install the NuGet packages:

AsyncAPI.NET

Nuget
Nuget

AsyncAPI.Readers

Nuget
Nuget

AsyncAPI.Bindings

Nuget

Example Usage

Main classes to know:

  • AsyncApiStringReader
  • AsyncApiStringWriter
    • There is an extension on the AsyncApiDocument type which allows Serializing as well (new AsyncApiDocument().SerializeAsJson() or new AsyncApiDocument().SerializeAsYaml()

Writing

var myFirstAsyncApi = new AsyncApiDocument
{
  Info = new AsyncApiInfo
  {
    Title = "my first asyncapi"
  },
  Channels = new Dictionary<string, AsyncApiChannel>
  {
    {
	"users", new AsyncApiChannel
	{
	    Subscribe = new AsyncApiOperation
	    {
		OperationId = "users",
		Description = "my users channel"
	    }
	}
    }
  }
};
var yaml = myFirstAsyncApi.SerializeAsYaml();
//asyncapi: '2.5.0'
//  info:
//    title: my first asyncapi
//  channels:
//    users:
//      subscribe:
//        operationId: users
//        description: my users channel

Reading

var httpClient = new HttpClient
{
  BaseAddress = new Uri("https://raw.githubusercontent.com/asyncapi/spec/"),
};

var stream = await httpClient.GetStreamAsync("master/examples/streetlights-kafka.yml");
var asyncApiDocument = new AsyncApiStreamReader().Read(stream, out var diagnostic);

Bindings

To add support for reading bindings, simply add the bindings you wish to support, to the Bindings collection of AsyncApiReaderSettings. There is a nifty helper to add different types of bindings, or like in the example All of them.

var settings = new AsyncApiReaderSettings();
settings.Bindings = BindingsCollection.All;
var asyncApiDocument = new AsyncApiStringReader(settings).Read(stream, out var diagnostic);

Attribution

Contribution

This project welcomes contributions and suggestions. Do you want to contribute to the project? Find out how here.

License

Modified Apache 2.0 (Section 6)

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on AsyncAPI.NET.Bindings:

Repository Stars
asyncapi/saunter
Saunter is a code-first AsyncAPI documentation generator for dotnet.
Version Downloads Last updated
6.0.0-beta.109 56 1/31/2025
6.0.0-beta.108 53 1/31/2025
6.0.0-beta.107 54 1/27/2025
6.0.0-beta.106 48 1/27/2025
6.0.0-beta.105 48 1/23/2025
6.0.0-beta.104 770 1/10/2025
6.0.0-beta.99 621 10/25/2024
6.0.0-beta.98 67 10/14/2024
6.0.0-beta.97 857 9/4/2024
6.0.0-beta.96 91 8/22/2024
6.0.0-beta.95 127 8/16/2024
6.0.0-beta.94 68 8/12/2024
6.0.0-beta.93 71 8/8/2024
6.0.0-beta.92 83 7/4/2024
6.0.0-beta.91 61 6/14/2024
6.0.0-beta.1 46 1/9/2025
5.2.4 20,700 7/29/2024
5.2.3 74 7/29/2024
5.2.2 80 7/29/2024
5.2.2-beta.87 65 6/14/2024
5.2.1 2,551 6/12/2024
5.2.1-beta.86 57 5/28/2024
5.2.1-beta.85 54 5/28/2024
5.2.1-beta.84 917 5/21/2024
5.2.0 1,322 3/30/2024
5.2.0-beta.83 69 3/30/2024
5.2.0-beta.82 62 3/30/2024
5.2.0-beta.81 72 3/30/2024
5.2.0-beta.80 67 3/26/2024
5.2.0-beta.79 73 3/26/2024
5.2.0-beta.78 73 3/26/2024
5.2.0-beta.77 68 3/26/2024
5.2.0-beta.76 68 3/25/2024
5.2.0-beta.75 70 3/14/2024
5.2.0-beta.74 75 2/27/2024
5.2.0-beta.73 877 2/26/2024
5.2.0-beta.72 66 2/26/2024
5.2.0-beta.71 75 2/26/2024
5.1.1 857 2/16/2024
5.1.1-beta.69 81 2/16/2024
5.1.0 172 2/15/2024 5.1.0 is deprecated because it has critical bugs.
5.1.0-beta 115 2/13/2024
5.0.0 791 12/14/2023
4.2.0-beta 880 11/1/2023
4.1.0 17,089 9/27/2023
4.1.0-beta 823 9/25/2023
4.0.2 20,948 8/1/2023
4.0.2-beta 145 7/30/2023
4.0.1 396 7/11/2023
4.0.1-beta 296 6/29/2023
4.0.0 858 6/12/2023
4.0.0-beta 567 6/5/2023