Consider JsonValidationMetadataProviders affect only API Controllers
Open
area-mvc
Priority:3
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
The new `SystemTextJsonValidationMetadataProvider` and `NewtonsoftJsonValidationMetadataProviders` were added in #39008, however, since their presence will impact how the `DisplayName` or `ModelState errors messages` are generated for both APIs and Views was decided to not add them as default.
However, they fix a very common issue for APIs, not much other scenarios, and we should consider an approach to those new providers only affect `API Controllers`. With that, they could be added as part of the default `ModelProviders` without affecting other parts of the application.
Related issue: #39010
Contributor guide
Assessment
This issue has not been assessed yet.