Masswagger 1.5.0

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

Masswagger

Description

This package adds to your website/webapi a Swagger-like UI for MassTransit.

With Masswagger you can view and test your consumers easily and quickly.

screenshot

Installation

Install the package:

dotnet add package Masswagger --version 1.5.0

And Masswagger services to your DI:

services.AddMasswagger();

And Masswagger middleware to your DI:

app.UseMasswagger();

Note: If your project using the UseEndpoints(), UseAuthenticationMiddleware() middleware, move the app.UseMasswagger(); under it.

Usage

Run the project and browser to the url /masswagger.

More Options

Display Types Documentation

You can display the Summary of the consumers and the message types by adding GenerateDocumentationFile to your .csproj file:

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <GenerateDocumentationFile>True</GenerateDocumentationFile>
  </PropertyGroup>

Result: screenshot

TestValue Attribute

To use TestValue attribute you need to install the Masswagger.Attributes package.

By using the TestValue attribute you can have default test value in message type:

    public class PublishNewsReport
    {
        [TestValue("test value from TestValueAttribute")]
        public string? Description { get; set; }
    }

If given multiple values the test value will be picked randomly:

    public class PublishNewsReport
    {
        [TestValue("test value1", "test value2")]
        public string? Description { get; set; }
    }

Multiple values also can use to set the test value for Array/List property:

    public class PublishNewsReport
    {
        [TestValue("value1", "value2", "value3")]
        public List<string> Descriptions { get; set; }
    }
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 is compatible.  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 is compatible.  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. 
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
1.5.0 1,898 6/2/2024
0.9.0-alpha 209 7/9/2023
0.8.0-alpha 240 7/9/2023
0.7.0-alpha 207 7/9/2023
0.6.0-alpha 258 7/8/2023
0.5.0-alpha 211 7/5/2023
0.4.0-alpha 250 7/5/2023
0.3.0-alpha 214 7/5/2023
0.2.0-alpha 219 7/4/2023