-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
DocsThis issue tracks updating documentationThis issue tracks updating documentationarea-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
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
No response
Describe the solution you'd like
It might be useful to emphasize at https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-10.0?view=aspnetcore-9.0#enable-built-in-validation-support-for-minimal-apis that UnmappedMemberHandling
by default is set to Skip
, even when adding builder.Services.AddValidation();
. This might seem strange when you assume that adding the validation service will just validate the whole incoming JSON with the object type.
To take things further, it might even make more sense to call it AddAnnotationValidation
instead of AddValidation
because it's really scoped to a small part, and it isn't responsible for all the validation, like unmatched (query) parameters, or enums.
Additional context
No response
Metadata
Metadata
Assignees
Labels
DocsThis issue tracks updating documentationThis issue tracks updating documentationarea-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