-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-validationIssues related to model validation in minimal and controller-based APIsIssues related to model validation in minimal and controller-based APIs
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
When I decorate a record type with a [ValidatatableType] attribute, no validation information is generated for the type.
Expected Behavior
Both classes and records decorated with [ValidatableType] should cause validation information to be created.
Steps To Reproduce
Clone this repository: https://github.com/maartenvansambeek/validatabletype-on-records.git
Run dotnet build using .NET 10 preview 5.
Look at line 64 in the file:
obj\Debug\net10.0\generated\Microsoft.AspNetCore.Http.ValidationsGenerator\Microsoft.AspNetCore.Http.ValidationsGenerator.ValidationsGenerator\ValidatableInfoResolver.g.cs
See that information is generated for the class type, but not the records type in the project.
Exceptions (if any)
No response
.NET Version
10.0.100-preview.5.25277.114
Anything else?
No response
marcominerva
Metadata
Metadata
Assignees
Labels
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-validationIssues related to model validation in minimal and controller-based APIsIssues related to model validation in minimal and controller-based APIs