AsyncAPI.NET 5.2.0-beta.80

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

// Install AsyncAPI.NET as a Cake Tool
#tool nuget:?package=AsyncAPI.NET&version=5.2.0-beta.80&prerelease

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 net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on AsyncAPI.NET:

Package Downloads
AsyncAPI.NET.Readers

AsyncAPI.NET Readers for JSON and YAML documents

AsyncAPI.NET.Bindings

AsyncAPI.NET Bindings

Benzene.Schema.OpenApi

Package Description

AsyncAPI.Net.UI

A .Net library to generate AsyncAPI documentation by code first, to easily share and maintain your event-driven architecture.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.2.0 668 3/30/2024
5.2.0-beta.83 48 3/30/2024
5.2.0-beta.82 45 3/30/2024
5.2.0-beta.81 54 3/30/2024
5.2.0-beta.80 53 3/26/2024
5.2.0-beta.79 50 3/26/2024
5.2.0-beta.78 54 3/26/2024
5.2.0-beta.77 51 3/26/2024
5.2.0-beta.76 51 3/25/2024
5.2.0-beta.75 45 3/14/2024
5.2.0-beta.74 53 2/27/2024
5.2.0-beta.73 477 2/26/2024
5.2.0-beta.72 56 2/26/2024
5.2.0-beta.71 42 2/26/2024
5.1.1 1,244 2/16/2024
5.1.1-beta.69 49 2/16/2024
5.1.0 281 2/15/2024
5.1.0-beta 179 2/13/2024
5.0.0 2,600 12/14/2023
4.2.0-beta 1,159 11/1/2023
4.1.0 12,530 9/27/2023
4.1.0-beta 1,164 9/25/2023
4.0.2 8,890 8/1/2023
4.0.2-beta 586 7/30/2023
4.0.1 1,313 7/11/2023
4.0.1-beta 745 6/29/2023
4.0.0 2,382 6/12/2023
4.0.0-beta 1,007 6/5/2023
3.0.2 1,407 3/30/2023
3.0.1 2,625 3/13/2023
2.0.2 874 2/22/2023
2.0.1 2,179 2/8/2023
2.0.0 967 2/8/2023