AsyncAPI.NET
2.0.1
See the version list below for details.
dotnet add package AsyncAPI.NET --version 2.0.1
NuGet\Install-Package AsyncAPI.NET -Version 2.0.1
<PackageReference Include="AsyncAPI.NET" Version="2.0.1" />
paket add AsyncAPI.NET --version 2.0.1
#r "nuget: AsyncAPI.NET, 2.0.1"
// Install AsyncAPI.NET as a Cake Addin #addin nuget:?package=AsyncAPI.NET&version=2.0.1 // Install AsyncAPI.NET as a Cake Tool #tool nuget:?package=AsyncAPI.NET&version=2.0.1
AsyncAPI.NET
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.
Installation
Install the NuGet packages:
Example Usage
Main classes to know:
- AsyncApiStringReader
- AsyncApiStringWriter
- There is an extension on the AsyncApiDocument type which allows Serializing as well (
new AsyncApiDocument().SerializeAsJson()
ornew AsyncApiDocument().SerializeAsYaml()
- There is an extension on the AsyncApiDocument type which allows Serializing as well (
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);
Attribution
Contribution
This project welcomes contributions and suggestions. Do you want to contribute to the project? Find out how here.
License
Product | Versions 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. |
-
net6.0
- SharpYaml (>= 1.9.2)
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 |
---|---|---|
6.0.0-beta.99 | 133 | 10/25/2024 |
6.0.0-beta.98 | 45 | 10/14/2024 |
6.0.0-beta.97 | 1,477 | 9/4/2024 |
6.0.0-beta.96 | 80 | 8/22/2024 |
6.0.0-beta.95 | 118 | 8/16/2024 |
6.0.0-beta.94 | 62 | 8/12/2024 |
6.0.0-beta.93 | 66 | 8/8/2024 |
6.0.0-beta.92 | 75 | 7/4/2024 |
6.0.0-beta.91 | 53 | 6/14/2024 |
5.2.4 | 9,357 | 7/29/2024 |
5.2.3 | 117 | 7/29/2024 |
5.2.2 | 123 | 7/29/2024 |
5.2.2-beta.87 | 58 | 6/14/2024 |
5.2.1 | 1,695 | 6/12/2024 |
5.2.1-beta.86 | 49 | 5/28/2024 |
5.2.1-beta.85 | 49 | 5/28/2024 |
5.2.1-beta.84 | 931 | 5/21/2024 |
5.2.0 | 6,424 | 3/30/2024 |
5.2.0-beta.83 | 66 | 3/30/2024 |
5.2.0-beta.82 | 62 | 3/30/2024 |
5.2.0-beta.81 | 69 | 3/30/2024 |
5.2.0-beta.80 | 65 | 3/26/2024 |
5.2.0-beta.79 | 66 | 3/26/2024 |
5.2.0-beta.78 | 69 | 3/26/2024 |
5.2.0-beta.77 | 66 | 3/26/2024 |
5.2.0-beta.76 | 69 | 3/25/2024 |
5.2.0-beta.75 | 56 | 3/14/2024 |
5.2.0-beta.74 | 61 | 2/27/2024 |
5.2.0-beta.73 | 868 | 2/26/2024 |
5.2.0-beta.72 | 69 | 2/26/2024 |
5.2.0-beta.71 | 54 | 2/26/2024 |
5.1.1 | 1,566 | 2/16/2024 |
5.1.1-beta.69 | 57 | 2/16/2024 |
5.1.0 | 322 | 2/15/2024 |
5.1.0-beta | 223 | 2/13/2024 |
5.0.0 | 3,031 | 12/14/2023 |
4.2.0-beta | 1,188 | 11/1/2023 |
4.1.0 | 24,114 | 9/27/2023 |
4.1.0-beta | 1,199 | 9/25/2023 |
4.0.2 | 18,460 | 8/1/2023 |
4.0.2-beta | 628 | 7/30/2023 |
4.0.1 | 1,364 | 7/11/2023 |
4.0.1-beta | 783 | 6/29/2023 |
4.0.0 | 2,942 | 6/12/2023 |
4.0.0-beta | 1,038 | 6/5/2023 |
3.0.2 | 1,570 | 3/30/2023 |
3.0.1 | 3,107 | 3/13/2023 |
2.0.2 | 919 | 2/22/2023 |
2.0.1 | 2,236 | 2/8/2023 |
2.0.0 | 1,009 | 2/8/2023 |