ApiExplorer does not correctly populate parameters for IApiDescriptionGroupCollectionProvider when modelbinding is used #27671
Labels
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
✔️ Resolution: Duplicate
Resolved as a duplicate of another issue
Status: Resolved
ApiDescriptionProblem (2).zip
Describe the bug
When using [modelbinder] attribute, the ApiExplorer does not correctly populate for parameters of a controller method
To Reproduce
Populate the API Explorer for a parameter that uses [modelbinder]. Instead of the parameterDescriptions being enumerated in the ApiDescription as happened in .Net Core 2.2, the ApiDescription contains only the name of the parameter.
In the attached project, run it and put a breakpoint in the constructor of SampleDataController. The property group contains 2 items. The first uses modelbinding and has one parameter whereas the second directly maps to the bound model and has the expected 21.
Exceptions (if any)
None
Further technical details
dotnet --info
The text was updated successfully, but these errors were encountered: