Bielu.AspNetCore.AsyncApi.LikeC4 3.4.0

Prefix Reserved
dotnet add package Bielu.AspNetCore.AsyncApi.LikeC4 --version 3.4.0
                    
NuGet\Install-Package Bielu.AspNetCore.AsyncApi.LikeC4 -Version 3.4.0
                    
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="Bielu.AspNetCore.AsyncApi.LikeC4" Version="3.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bielu.AspNetCore.AsyncApi.LikeC4" Version="3.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Bielu.AspNetCore.AsyncApi.LikeC4" />
                    
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 Bielu.AspNetCore.AsyncApi.LikeC4 --version 3.4.0
                    
#r "nuget: Bielu.AspNetCore.AsyncApi.LikeC4, 3.4.0"
                    
#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 Bielu.AspNetCore.AsyncApi.LikeC4@3.4.0
                    
#: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=Bielu.AspNetCore.AsyncApi.LikeC4&version=3.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Bielu.AspNetCore.AsyncApi.LikeC4&version=3.4.0
                    
Install as a Cake Tool

Bielu.AspNetCore.AsyncApi.LikeC4

Generates a LikeC4 architecture model (.c4) from AsyncAPI documents: an element for every service and every channel, a relationship for every operation, the service-to-service flows the channels imply, and views of them. The diagram of who sends what to whom then follows the code instead of being drawn by hand.

Installation

dotnet add package Bielu.AspNetCore.AsyncApi.LikeC4

The dotnet asyncapi likec4 command of Bielu.AspNetCore.AsyncApi.Cli wraps it, for use in a build or CI job.

Usage

using Bielu.AspNetCore.AsyncApi.LikeC4;

var model = AsyncApiLikeC4Generator.Generate(
[
    new AsyncApiLikeC4Source("orders", File.ReadAllText("orders.asyncapi.json")),
    new AsyncApiLikeC4Source("inventory", File.ReadAllText("inventory.asyncapi.yaml")),
]);
Directory.CreateDirectory("architecture");
File.WriteAllText("architecture/asyncapi.c4", model);
AsyncAPI LikeC4
document asyncapiService element
channel (matched by address across documents) asyncapiChannel element
send operation service -[asyncapiSend]-> channel
receive operation channel -[asyncapiReceive]-> service
sender and receiver of the same messages sender -[asyncapiFlow]-> receiver

Arazzo documents add a dynamic view per workflow, drawn as a sequence on the same elements:

var model = AsyncApiLikeC4Generator.Generate(
    asyncApiSources,
    [new ArazzoLikeC4Source("checkout", File.ReadAllText("checkout.arazzo.yaml"))]);

Documents may be AsyncAPI 2.x or 3.x and Arazzo 1.0.x or 1.1.x, JSON or YAML. Describe the generated elements further in a .c4 file of your own with extend <id> { … }, so the generated one can be written again on every build.

LikeC4ModelChecker.Check(model, sources) checks a model written by hand, exported with likec4 export json, against the documents: relationships with no operation behind them, and operations it does not draw. Its elements stand for documents and channels through the same metadata (asyncapi 'orders', asyncapiChannel 'orders.created').

Documentation

Feedback & Contributing

Copyright (c) 2025 Arkadiusz Biel. Released under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
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

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.4.0 49 11/29/2026
3.4.0-beta.20261129131534 36 11/29/2026
3.4.0-beta.20261129131529 38 11/29/2026
3.4.0-beta.20261129131234 36 11/29/2026
3.4.0-beta.20261129125539 54 11/29/2026
3.4.0-beta.20261129105511 46 11/29/2026
3.4.0-beta.20261127215813 50 11/27/2026
3.4.0-beta.20261127215451 43 11/27/2026
3.4.0-beta.20261127215420 42 11/27/2026
3.4.0-beta.20261127094040 52 11/27/2026