Saunter 0.1.0
See the version list below for details.
dotnet add package Saunter --version 0.1.0
NuGet\Install-Package Saunter -Version 0.1.0
<PackageReference Include="Saunter" Version="0.1.0" />
<PackageVersion Include="Saunter" Version="0.1.0" />
<PackageReference Include="Saunter" />
paket add Saunter --version 0.1.0
#r "nuget: Saunter, 0.1.0"
#:package Saunter@0.1.0
#addin nuget:?package=Saunter&version=0.1.0
#tool nuget:?package=Saunter&version=0.1.0
Saunter
Saunter is an AsyncAPI documentation generator for dotnet.
Getting Started
Install the Saunter package
dotnet add package SaunterIn the
ConfigureServicesmethod ofStartup.cs, configure Saunter.// Add Saunter to the application services. services.AddAsyncApiSchemaGeneration(options => { // Specify example type(s) from assemblies to scan. options.AssemblyMarkerTypes = new[] {typeof(StreetlightMessageBus)}; // Build as much (or as little) of the AsyncApi document as you like. // Saunter will generate Channels, Operations, Messages, etc, but you // may want to specify Info here. options.AsyncApi = new AsyncApiDocument { Info = new Info("Streetlights API", "1.0.0") { Description = "The Smartylighting Streetlights API allows you\nto remotely manage the city lights.", License = new License("Apache 2.0") { Url = "https://www.apache.org/licenses/LICENSE-2.0" } }, Servers = { { "mosquitto", new Server("test.mosquitto.org", "mqtt") } } }; });Add attributes to your classes which publish or subscribe to messages.
[AsyncApi] // Tells Saunter to scan this class. public class StreetlightMessageBus : IStreetlightMessageBus { [Channel("publish/light/measured")] // Creates a Channel [PublishOperation(typeof(LightMeasuredEvent), Summary = "Inform about environmental lighting conditions for a particular streetlight.")] // A simple Publish operation. public void PublishLightMeasuredEvent(Streetlight streetlight, int lumens) {}Add saunter middleware to host the AsyncApi json document. In the
Configuremethod ofStartup.cs:app.UseMiddleware<AsyncApiMiddleware>();Use the published AsyncApi document:
// HTTP GET /asyncapi/asyncapi.json { // Properties from Startup.cs "asyncapi": "2.0.0", "info": { "title": "Streetlights API", "version": "1.0.0", "description": "The Smartylighting Streetlights API allows you\nto remotely manage the city lights.", // ... }, // Properties generated from Attributes "channels": { "light/measured": { "publish": { "operationId": "PublishLightMeasuredEvent", "summary": "Inform about environmental lighting conditions for a particular streetlight.", //... }
Contributing
Feel free to get involved in the project by opening issues, or submitting pull requests.
Thanks
- This project is heavily inspired by Swashbuckle.
- We use Namotion.Reflection for pulling xml documentation.
- And Newtonsoft.Json for serialization.
| Product | Versions 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. 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. net10.0 was computed. 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. |
| .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. |
-
.NETStandard 2.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 3.0.0)
- Microsoft.Extensions.Options (>= 3.0.0)
- Namotion.Reflection (>= 1.0.6)
- Newtonsoft.Json (>= 12.0.2)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Saunter:
| Package | Downloads |
|---|---|
|
EasyDesk.CleanArchitecture.Web
Utilities for the ASP.NET Core web layer of the clean architecture as seen by EasyDesk. |
|
|
Ev.ServiceBus.AsyncApi
This package helps you generate an Async API Schema. Resources registered in Ev.ServiceBus will be automatically added to the schema. |
|
|
SlimMessageBus.Host.AsyncApi
Extension for SlimMessageBus that adds AsyncAPI specification generator for the Saunter library |
|
|
Butterfly.API
Package Description |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Saunter:
| Repository | Stars |
|---|---|
|
mehdihadeli/food-delivery-microservices
🍔 A practical and cloud-native food delivery microservices, built with .Net Aspire, .Net 9, MassTransit, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
|
|
|
zarusz/SlimMessageBus
Lightweight message bus interface for .NET (pub/sub and request-response) with transport plugins for popular message brokers.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 0.13.0 | 1,133,200 | 1/16/2024 |
| 0.12.0 | 592,048 | 6/15/2023 |
| 0.11.0 | 296,628 | 10/3/2022 |
| 0.10.0 | 11,987 | 8/22/2022 |
| 0.9.1 | 260,300 | 11/8/2021 |
| 0.9.0 | 29,140 | 10/17/2021 |
| 0.8.0 | 36,466 | 9/10/2021 |
| 0.7.1 | 36,791 | 8/4/2021 |
| 0.7.0 | 624 | 8/4/2021 |
| 0.6.0 | 1,815 | 8/3/2021 |
| 0.5.0 | 998 | 7/28/2021 |
| 0.4.0 | 8,247 | 7/27/2021 |
| 0.3.1 | 1,256 | 7/19/2021 |
| 0.3.0 | 9,237 | 7/19/2021 |
| 0.2.0 | 115,987 | 8/4/2020 |
| 0.1.0 | 1,091 | 7/2/2020 |
| 0.1.0-alpha-46 | 232 | 7/1/2020 |
| 0.1.0-alpha-44 | 1,280 | 5/4/2020 |
| 0.1.0-alpha-42 | 259 | 5/4/2020 |
| 0.1.0-alpha-41 | 272 | 4/9/2020 |
| 0.1.0-alpha-39 | 262 | 4/9/2020 |
| 0.1.0-alpha-37 | 267 | 3/20/2020 |
| 0.1.0-alpha-34 | 273 | 10/21/2019 |
| 0.1.0-alpha-32 | 257 | 10/21/2019 |
| 0.1.0-alpha-29 | 312 | 10/21/2019 |
| 0.1.0-alpha-25 | 270 | 10/7/2019 |