PopValidations.MediatR
0.9.0.1
See the version list below for details.
dotnet add package PopValidations.MediatR --version 0.9.0.1
NuGet\Install-Package PopValidations.MediatR -Version 0.9.0.1
<PackageReference Include="PopValidations.MediatR" Version="0.9.0.1" />
paket add PopValidations.MediatR --version 0.9.0.1
#r "nuget: PopValidations.MediatR, 0.9.0.1"
// Install PopValidations.MediatR as a Cake Addin #addin nuget:?package=PopValidations.MediatR&version=0.9.0.1 // Install PopValidations.MediatR as a Cake Tool #tool nuget:?package=PopValidations.MediatR&version=0.9.0.1
PopValidation's MedaitR integration allows you to run PopValidations before the MediatR Handlers, and stop execution on failure.
Usage
Pop Validations MediatR Integration, is usable for both public and corporate use, without need for compensation, or mention. Feature or bugfix PR's, including appropriate tests are more than welcome.
Developers
The core developer is Adam Williamson(https://github.com/AdamWilliamson).
Example
PopValidation provides the ability to Describe the validations input configured for your objects. These descriptions can be imported into your OpenApi spec, using this package, with multiple configuration options. The OpenApi specification can be modified in 2 ways, by including the validation descriptions in an attribute, as well as, or instead of, modifying the OpenApi in-built validation options.
An example
using PopValidation;
using PopValidations.MediatR;
builder.Services.AddMediatR(
cfg => cfg
.RegisterServicesFromAssemblyContaining<BasicObjectController>()
// Pop Validation Extension, that adds a MediatR Behaviour to validate all objects before executing the handlers.
.AddPopValidations()
);
// PopValidations Extensions Function for Registering The Validation Runner
builder.Services.RegisterRunner()
// And this extension and all the Validators in the same assembly as "SongValidator"
.RegisterAllMainValidators(typeof(BasicObjectController).Assembly);
Full Documentation
Full documentation can be found at https://adamwilliamson.github.io/popvalidations/
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
- MediatR (>= 12.1.1)
- Microsoft.AspNet.WebApi (>= 5.2.9)
- PopValidations (>= 0.9.0.1)
- System.Net.Http (>= 4.3.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Working towards V1. This contains the basics needed to run PopValidations before MediatR Handlers, and fail or continue dependant on their success.