MicroElements.NSwag.FluentValidation
7.1.0-beta.1
Prefix Reserved
See the version list below for details.
dotnet add package MicroElements.NSwag.FluentValidation --version 7.1.0-beta.1
NuGet\Install-Package MicroElements.NSwag.FluentValidation -Version 7.1.0-beta.1
<PackageReference Include="MicroElements.NSwag.FluentValidation" Version="7.1.0-beta.1" />
<PackageVersion Include="MicroElements.NSwag.FluentValidation" Version="7.1.0-beta.1" />
<PackageReference Include="MicroElements.NSwag.FluentValidation" />
paket add MicroElements.NSwag.FluentValidation --version 7.1.0-beta.1
#r "nuget: MicroElements.NSwag.FluentValidation, 7.1.0-beta.1"
#:package MicroElements.NSwag.FluentValidation@7.1.0-beta.1
#addin nuget:?package=MicroElements.NSwag.FluentValidation&version=7.1.0-beta.1&prerelease
#tool nuget:?package=MicroElements.NSwag.FluentValidation&version=7.1.0-beta.1&prerelease
Adds FluentValidation rules to swagger schema.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 is compatible. 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. |
-
net8.0
- MicroElements.OpenApi.FluentValidation (>= 7.1.0-beta.1)
- NJsonSchema (>= 11.3.2)
-
net9.0
- MicroElements.OpenApi.FluentValidation (>= 7.1.0-beta.1)
- NJsonSchema (>= 11.3.2)
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 |
|---|---|---|
| 7.1.5-beta | 82 | 4/1/2026 |
| 7.1.4 | 189 | 3/29/2026 |
| 7.1.4-beta | 81 | 3/24/2026 |
| 7.1.3 | 108 | 3/24/2026 |
| 7.1.2 | 203 | 3/9/2026 |
| 7.1.1 | 98 | 3/9/2026 |
| 7.1.0 | 95 | 3/9/2026 |
| 7.1.0-beta.2 | 45 | 3/6/2026 |
| 7.1.0-beta.1 | 48 | 2/23/2026 |
| 7.0.6 | 112 | 3/3/2026 |
| 7.0.5 | 308 | 2/26/2026 |
| 7.0.4 | 179 | 2/17/2026 |
| 7.0.4-beta.3 | 48 | 2/14/2026 |
| 7.0.4-beta.2 | 50 | 2/14/2026 |
| 7.0.4-beta.1 | 52 | 2/14/2026 |
| 7.0.3 | 935 | 12/23/2025 |
| 7.0.2 | 611 | 12/23/2025 |
| 7.0.1 | 962 | 12/8/2025 |
| 6.1.1 | 2,186 | 9/2/2025 |
| 6.1.0 | 12,856 | 11/26/2024 |
$# Changes in 7.1.0-beta.1
- Added: New package `MicroElements.AspNetCore.OpenApi.FluentValidation` for Microsoft.AspNetCore.OpenApi support (Issue #149)
- Implements `IOpenApiSchemaTransformer` for .NET 9 and .NET 10
- Supports all FluentValidation rules: Required, NotEmpty, Length, Pattern, Email, Comparison, Between
- Handles AllOf/OneOf/AnyOf sub-schemas for polymorphic models
- No dependency on Swashbuckle
- User-facing API: `services.AddFluentValidationRulesToOpenApi()` + `options.AddFluentValidationRules()`
- .NET 10: full nested validator support via `GetOrCreateSchemaAsync`
- .NET 9: limited nested validator support (fallback to empty schema)
- Added: Sample project `SampleAspNetCoreOpenApi` demonstrating Microsoft.AspNetCore.OpenApi integration
- Added: ADR-001 documenting the architectural decision for AspNetCore.OpenApi support
# Changes in 7.0.4
- Fixed: `[AsParameters]` types in minimal API and `[FromQuery]` container types create unused schemas in `components/schemas` (Issue #180)
- Added: Support for keyed DI services (Issue #165)
- Validators registered via `AddKeyedScoped`, `AddKeyedTransient`, `AddKeyedSingleton` are now discovered automatically
- Removed: Deprecated `FluentValidation.AspNetCore` package reference (Issue #164)
- Replaced with `FluentValidation.DependencyInjectionExtensions` 12.0.0
# Changes in 7.0.3
- Fixed: NullReferenceException when models contain nested object properties (Issue #176 extended)
- Handle `OpenApiSchemaReference` for nested class properties in `OpenApiRuleContext`
- Add safe `TryGetValue` check in `NSwagRuleContext`
# Changes in 7.0.2
- Fixed: InvalidCastException when models contain enum properties (Issue #176)
- In Microsoft.OpenApi 2.x, enum properties are represented as `OpenApiSchemaReference` instead of `OpenApiSchema`
- Filter out schema references in `GetProperties()` method to avoid cast exception
# Changes in 7.0.1
- Fixed: FluentValidation rules not applied to `[FromForm]` parameters (Issue #170)
- Added `RequestBody` processing in `FluentValidationOperationFilter` for `multipart/form-data` and `application/x-www-form-urlencoded` content types
Full release notes can be found at: https://github.com/micro-elements/MicroElements.Swashbuckle.FluentValidation/blob/master/CHANGELOG.md