Undocumented breaking change in ASP.NET Core 7 model binding when using Nullability and model contains generic field
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
I guess this is more due to the docs not covering it, but there is a breaking change for how ASP.NET Core 7 handles nullability and Required fields for model binding. It's lacking from this list: https://learn.microsoft.com/en-us/dotnet/core/compatibility/7.0
### Expected Behavior
Either the same behaviour re model binding between 6 and 7, or the docs listing this specific detail as a breaking change.
### Steps To Reproduce
https://github.com/johnkors/aspnetcore7-compat-repro
GitHub actions running the tests in both 6 and 7 is provided, which shows _one_ test running OK in ASP.NET Core 6 but failing in 7.

There is a small difference in how nullability and required is handled if the model contains 1 vs more than 1 fields, and the model contains a generic field.
### Exceptions (if any)
_No response_
### .NET Version
7
### Anything else?
ASP.NET Core 7
Contributor guide
Assessment
This issue has not been assessed yet.