MicroElements.Swashbuckle.FluentValidation 7.1.6-beta.1

Prefix Reserved
This is a prerelease version of MicroElements.Swashbuckle.FluentValidation.
There is a newer version of this package available.
See the version list below for details.
dotnet add package MicroElements.Swashbuckle.FluentValidation --version 7.1.6-beta.1
                    
NuGet\Install-Package MicroElements.Swashbuckle.FluentValidation -Version 7.1.6-beta.1
                    
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="MicroElements.Swashbuckle.FluentValidation" Version="7.1.6-beta.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MicroElements.Swashbuckle.FluentValidation" Version="7.1.6-beta.1" />
                    
Directory.Packages.props
<PackageReference Include="MicroElements.Swashbuckle.FluentValidation" />
                    
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 MicroElements.Swashbuckle.FluentValidation --version 7.1.6-beta.1
                    
#r "nuget: MicroElements.Swashbuckle.FluentValidation, 7.1.6-beta.1"
                    
#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 MicroElements.Swashbuckle.FluentValidation@7.1.6-beta.1
                    
#: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=MicroElements.Swashbuckle.FluentValidation&version=7.1.6-beta.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=MicroElements.Swashbuckle.FluentValidation&version=7.1.6-beta.1&prerelease
                    
Install as a Cake Tool

Swagger ISchemaFilter that uses FluentValidation validators instead System.ComponentModel based attributes.

Product 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 is compatible.  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 (52)

Showing the top 5 NuGet packages that depend on MicroElements.Swashbuckle.FluentValidation:

Package Downloads
Reo.Core.Queue.RabbitMq

Package Description

Reo.Core.Email

Package Description

Mii.Rinjani.Gateway.Commons

Package Description

H21.AspNetCore.Validation

Package Description

WalletFramework.AspNetCore.Contracts

Api Library

GitHub repositories (4)

Showing the top 4 popular GitHub repositories that depend on MicroElements.Swashbuckle.FluentValidation:

Repository Stars
AlphaYu/adnc
A pragmatic .NET 8 framework for modular monoliths to evolve seamlessly into distributed microservices.
AntonioFalcaoJr/EventualShop
A state-of-the-art distributed system using Reactive DDD as uncertainty modeling, Event Storming as subdomain decomposition, Event Sourcing as an eventual persistence mechanism, CQRS, Async Projections, Microservices for individual deployable units, Event-driven Architecture for efficient integration, and Clean Architecture as domain-centric design
nhonvo/clean-architecture-net-8.0
Clean Architecture Web API Project
melikpehlivanov/AuctionSystem
Auction system written in ASP.NET Core
Version Downloads Last Updated
7.1.7-beta.3 51 6/17/2026
7.1.7-beta.2 55 6/17/2026
7.1.7-beta.1 61 6/15/2026
7.1.6 23,297 6/2/2026
7.1.6-beta.1 50 6/2/2026
7.1.5-beta.2 348 5/16/2026
7.1.5-beta 415 4/1/2026
7.1.4 218,468 3/29/2026
7.1.4-beta 145 3/24/2026
7.1.3 11,337 3/24/2026
7.1.2 62,928 3/9/2026
7.1.1 1,593 3/9/2026
7.1.0 1,554 3/9/2026
7.1.0-beta.2 75 3/6/2026
7.1.0-beta.1 226 2/23/2026
7.0.6 22,075 3/3/2026
7.0.5 11,504 2/26/2026
7.0.4 52,170 2/17/2026
7.0.4-beta.3 71 2/14/2026
7.0.4-beta.2 70 2/14/2026
Loading failed

$# Changes in 7.1.6
- Fixed: `$ref` still replaced with an inline copy (and the child component left orphaned) when nested object constraints come from `ChildRules` or an inline child validator (Issue #198, comment 4601720562)
 - The 7.1.3 fix restored unmodified `$ref`s, but when the nested type had no standalone validator its component schema gained its `Required` only after the parent's inline snapshot, so the stale `Required` diverged and defeated the restore check — leaving an inline copy and an orphaned component
 - Fix: the `Required` comparison in `HasValidationConstraintChanges` is now directional — restoration is only blocked when the inline copy carries a required entry the component lacks
 - `SetValidator` (with a standalone child validator) was already correct; `BigInteger`/enum per-model constraints (Issues #146/#176) continue to work

# Changes in 7.1.5
- Added: `ConditionalRulesMode` option to control how `.When()`/`.Unless()` conditional rules are handled during schema generation (Issue #203)
 - `Exclude` (default): conditional rules are excluded from the schema (backward-compatible, existing behavior)
 - `Include`: conditional rules are included in the schema (useful when `.When()` is a null-guard and constraints should still appear)
 - `IncludeWithWarning`: same as `Include` but logs a warning for each conditional rule included
 - Usage: `options.ConditionalRules = ConditionalRulesMode.Include;`
- Fixed: Multiple `.Matches()` rules on one property displayed incorrectly — only the first pattern shown, property duplicated (Issue #204)
 - Multiple patterns were placed into separate `allOf` subschemas, which Swagger UI/Redoc/Scalar collapse, keeping only the first `pattern`
 - Now multiple `.Matches()` rules are combined into a single `pattern` via lookahead assertions (e.g. `(?=[\s\S]*(?:[a-z]))(?=[\s\S]*(?:[A-Z]))`), preserving `.Matches()` semantics and rendering correctly
 - Applied to all providers: Swashbuckle, `MicroElements.AspNetCore.OpenApi.FluentValidation`, and NSwag (NSwag previously kept only the last pattern)
 - Changed: `SchemaGenerationOptions.UseAllOfForMultipleRules` default `true` → `false`; set it to `true` to keep the legacy `allOf` representation

# Changes in 7.1.4
- Added: `FluentValidationOperationTransformer` (`IOpenApiOperationTransformer`) for `MicroElements.AspNetCore.OpenApi.FluentValidation` (Issue #200)
 - Query parameters with `[AsParameters]` now receive validation constraints (min/max, required, pattern, etc.)
 - Supports container type resolution with fallback via reflection for `[AsParameters]`
 - Copies validation constraints from schema properties to parameter schemas
 - Registered automatically via `AddFluentValidationRules()`
- Fixed: Nested DTOs in request body not receiving validation constraints (Issue #200)
 - `FluentValidationSchemaTransformer` skipped all property-level schemas, but for nested object types this was the only transformer call
 - Now processes property-level schemas for complex types using the property type's validator

# Changes in 7.1.3
- Fixed: `$ref` replaced with inline schema copy when using `SetValidator` with nested object types (Issue #198)
 - `ResolveRefProperty` (introduced in 7.1.2 for BigInteger isolation) replaced all `$ref` properties with copies, destroying reference structure in the OpenAPI document
 - Fix: snapshot `$ref` properties before rule application, restore them afterwards if no validation constraints were added by rules
 - BigInteger per-model constraints (Issue #146) continue to work correctly

# Changes in 7.1.2
- Added: `BigInteger` support for min/max validation constraints in OpenAPI schema generation (Issue #146)
 - `IsNumeric()` and `NumericToDecimal()` now handle `BigInteger` values
 - `BigInteger` properties with GreaterThan, LessThan, InclusiveBetween, ExclusiveBetween rules produce correct `minimum`/`maximum` in Swagger
 - NSwag provider updated with the same `BigInteger` support
 - Out-of-range `BigInteger` values (exceeding `decimal` range) are handled gracefully via existing try/catch
- Fixed: Shared schema mutation when multiple models reference the same `BigInteger` type with different constraints (net10.0)
 - `ResolveRefProperty` creates an isolated shallow copy before applying rule mutations
 - Prevents `$ref`-based schema corruption across models in `SchemaRepository`
- Fixed: Replaced deprecated `PackageLicenseUrl` with `PackageLicenseExpression` (Issue #144)
- Fixed: Replaced deprecated `PackageIconUrl` with embedded `PackageIcon`


Full release notes can be found at: https://github.com/micro-elements/MicroElements.Swashbuckle.FluentValidation/blob/master/CHANGELOG.md