Min API validation fails for Record types #61379
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-validation
Issues related to model validation in minimal and controller-based APIs
Is there an existing issue for this?
Describe the bug
When the input of an API is a record type, the validation endpoint filter throws an exception.
Expected Behavior
Validation should work correctly.
Steps To Reproduce
The "validation-record-types" project in this repo is a minimal repro of the problem:
https://github.com/mikekistler/dotnet10-issue-repros
The .http file contains a request that will trigger the error.
If you comment out the
#define
at the top of Program.cs, the project uses a class instead of a record and in this configuration the app works correctly.Exceptions (if any)
No response
.NET Version
10.0.100-preview.3.25201.16
Anything else?
No response
The text was updated successfully, but these errors were encountered: