MicroElements.OpenApi.FluentValidation 7.3.0

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

Package Description

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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on MicroElements.OpenApi.FluentValidation:

Package Downloads
MicroElements.Swashbuckle.FluentValidation

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

MicroElements.AspNetCore.OpenApi.FluentValidation

Applies FluentValidation rules to OpenAPI schemas generated by Microsoft.AspNetCore.OpenApi (IOpenApiSchemaTransformer).

MicroElements.NSwag.FluentValidation

Adds FluentValidation rules to swagger schema.

X2031.MicroElements.NSwag.FluentValidation

Adds FluentValidation rules to swagger schema.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
7.3.0 0 11/14/2026
7.3.0-beta.1 238 10/31/2026
7.2.4 20,389 11/3/2026
7.2.3 9,941 10/31/2026
7.2.2 454,898 8/21/2026
7.2.1 412,235 7/13/2026
7.2.0 9,962 7/12/2026
7.1.11 19,944 7/12/2026
7.1.10 281 7/12/2026
7.1.9 29,067 7/9/2026
7.1.8 55,506 7/1/2026
7.1.8-beta.2 2,025 6/21/2026
7.1.8-beta.1 115 6/20/2026
7.1.7 72,115 6/20/2026
7.1.7-beta.3 213 6/17/2026
7.1.7-beta.2 120 6/17/2026
7.1.7-beta.1 119 6/15/2026
7.1.6 181,899 6/2/2026
7.1.6-beta.1 100 6/2/2026
7.1.5-beta.2 1,671 5/16/2026
Loading failed

$# Changes in 7.3.0
- Added: stable `net11.0` assets for the shared core, native ASP.NET Core OpenAPI adapter, and Swashbuckle adapter. The net11 Swashbuckle asset uses stable Swashbuckle 11.0.1 / Microsoft.OpenApi 3.11.0 and supports explicitly selected OpenAPI 3.2. Existing net8/net9/net10 Swashbuckle dependency families are preserved.
- Added: native OpenAPI 3.2 and explicitly selected 3.1 coverage at runtime and build time, preserving FluentValidation constraints on properties, child validators, collection items, parameters, forms, and shared schemas. .NET 11 dependencies and SDK baseline now use GA versions.
- Security: the native net10 adapter requires Microsoft.OpenApi 2.7.5 or later, excluding versions affected by GHSA-v5pm-xwqc-g5wc.
- Behavior: .NET 11 float/double bounds preserve the runtime's decimal conversion values without extra library rounding. Existing .NET 8–10 behavior and NSwag package targets are retained; existing NSwag assets are tested on a .NET 11 host.
- Includes the 7.2.4 fix for untyped string length constraints (#238). Source builds require SDK 11.0.100 or an eligible newer 11.0 feature band. MyGet publication is manual and restricted to the release tag.

# Changes in 7.3.0-beta.1
- Security: the native ASP.NET Core OpenAPI adapter now requires `Microsoft.OpenApi` 2.7.5 or later on net10, excluding versions affected by GHSA-v5pm-xwqc-g5wc.
- Added: `net11.0` assets for `MicroElements.OpenApi.FluentValidation` and `MicroElements.AspNetCore.OpenApi.FluentValidation`, using .NET 11 RC3 dependencies. The native ASP.NET Core adapter supports OpenAPI 3.2 and explicitly selected OpenAPI 3.1, with runtime and build-time generation coverage.
- Compatibility: Swashbuckle and NSwag retain their existing package targets and generator dependencies. Their existing assets were tested in .NET 11 hosts. This beta does not include the separate Swashbuckle 11 / Microsoft.OpenApi 3.x experiment.
- Behavior: on .NET 11, float and double validation bounds can appear with additional decimal digits in generated schemas because of runtime numeric conversion changes. The library preserves the runtime values without additional rounding; existing .NET 8–10 behavior is unchanged.
- Development: added a shared .NET 11 RC3 SDK baseline with `rollForward: latestFeature`. Package consumers do not need this SDK unless targeting .NET 11. Automatic package upload remains disabled; beta publication requires a manually triggered workflow on the beta tag.

# Changes in 7.2.4
- Fixed: `MicroElements.AspNetCore.OpenApi.FluentValidation` could lose string `minLength` and `maxLength` constraints when a custom JSON converter left the property's schema type unset (Issue #238, regression in 7.2.3). Length rules now fall back to the FluentValidation target's CLR string type only when the schema type is absent, preserving explicit schema types and the non-string `ChildRules` safeguards. A later transformer can restore the schema type without requiring registration order changes.
- Added regression coverage for string converters, late type restoration, identity child rules, explicit non-string schema types, and untyped non-string values.

# Changes in 7.2.3
- Fixed: constraints inside `ChildRules(child => child.RuleFor(x => x).Matches(...).DependentRules(...))` were missing from the parent property's OpenAPI schema. Identity child rules now contribute their constraints to the owning property (or collection item), including nested identity validators, while honoring rule/component filters and conditional-rule settings. The fix is shared by Swashbuckle, NSwag, and Microsoft.AspNetCore.OpenApi. Runtime validation is unchanged; schema generation does not execute `Must` predicates or repository lookups, and does not infer constraints from `DependentRules`.
- Fixed: identity child `NotNull`/`NotEmpty` rules preserve the owning property's nullability and optionality, matching FluentValidation's null-skipping child adapters. Non-empty string/array constraints and explicit parent presence rules are preserved.

# Changes in 7.2.2
- Fixed: `MicroElements.AspNetCore.OpenApi.FluentValidation` did not apply FluentValidation rules to a `[FromForm]` DTO bound by an **MVC controller** action (Issue #232, follow-up to the Swashbuckle-only #170 fix)
 - Root cause: MVC `ApiExplorer` flattens a controller's `[FromForm]` complex parameter into one form field per property, so `Microsoft.AspNetCore.OpenApi` builds the request body as an **inline** schema from those descriptions and never asks for the DTO's `JsonTypeInfo` — `FluentValidationSchemaTransformer` therefore never saw the type. Minimal API form bodies are not flattened and were never affected
 - Fix: `FluentValidationOperationTransformer` now applies the DTO's rules to the inline form schema for both `multipart/form-data` and `application/x-www-form-urlencoded`. The flattening is detected via `ModelMetadata.ContainerType` on the form-bound parameter descriptions, so a minimal API body — which the schema transformer already owns — is never touched twice
 - Property keys are taken verbatim from the schema, because a flattened form field is named after the model binder (`Name`, not `name`); the validator-side match stays name-insensitive
 - An action binding more than one form parameter composes its body as an `allOf` of one property bag per parameter; every bag is now constrained, and each bag is paired with the parameter that owns its fields — including the parameters the action binds directly (a loose scalar, array or `IFormFile`), which get a bag of their own but no rules. Without that pairing a DTO could be pulled into a foreign bag by a single coinciding field name and lose the constraints on its own bag
 - `encoding.contentType` (Issue #216) is now also emitted when the file part sits inside such an `allOf` bag
 - Dotted keys (`Inner.City`, ApiExplorer's binding path for a nested complex property) are skipped: the name matcher ignores separators, so such a key would otherwise inherit the rules of an unrelated root property named `InnerCity`. Nested form fields remain unsupported, matching the Swashbuckle form path
 - Issue #216 `encoding.contentType` is unchanged for the shapes it already covered, and now also consults every validator in multi-validator mode (`IsOneValidatorForType = false`) instead of only the first
 - Known limitations on this path (unchanged by this fix): a renamed form field (`[FromForm(Name = "...")]`, or a property renamed by the `INameResolver`) gets no constraints, and on net10 a form part rendered as a `$ref` (`IFormFile`, enums) cannot receive property-level constraints
 - Thanks to @bux for the report


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