Masswagger 1.5.0
dotnet add package Masswagger --version 1.5.0
NuGet\Install-Package Masswagger -Version 1.5.0
<PackageReference Include="Masswagger" Version="1.5.0" />
paket add Masswagger --version 1.5.0
#r "nuget: Masswagger, 1.5.0"
// Install Masswagger as a Cake Addin #addin nuget:?package=Masswagger&version=1.5.0 // Install Masswagger as a Cake Tool #tool nuget:?package=Masswagger&version=1.5.0
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.
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:
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 | 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 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. |
-
net6.0
- AutoBogus (>= 2.0.0)
- MassTransit (>= 8.0.1)
- Masswagger.Attributes (>= 1.0.0)
- Namotion.Reflection (>= 2.1.2)
- Newtonsoft.Json (>= 13.0.1)
-
net7.0
- AutoBogus (>= 2.0.0)
- MassTransit (>= 8.0.1)
- Masswagger.Attributes (>= 1.0.0)
- Namotion.Reflection (>= 2.1.2)
- Newtonsoft.Json (>= 13.0.1)
-
net8.0
- AutoBogus (>= 2.0.0)
- MassTransit (>= 8.0.1)
- Masswagger.Attributes (>= 1.0.0)
- Namotion.Reflection (>= 2.1.2)
- Newtonsoft.Json (>= 13.0.1)
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 | 129 | 6/2/2024 |
0.9.0-alpha | 141 | 7/9/2023 |
0.8.0-alpha | 121 | 7/9/2023 |
0.7.0-alpha | 118 | 7/9/2023 |
0.6.0-alpha | 131 | 7/8/2023 |
0.5.0-alpha | 123 | 7/5/2023 |
0.4.0-alpha | 119 | 7/5/2023 |
0.3.0-alpha | 123 | 7/5/2023 |
0.2.0-alpha | 133 | 7/4/2023 |