You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue also occurs with Stream and PipeReader inputs in MVC which are handled by the BodyModelBinder and end up being splatted out into the public properties on each respective type.
captainsafia
changed the title
Fix ApiExplorer metadata for FormFiles in MVC actions
Fix ApiExplorer metadata for FormFiles/Stream/PipeReader in MVC actions
Apr 25, 2024
MVC uses the
FormFileModelBinder
(ref) to support binding forIFormFile
,IFormFileCollection
, andIEnumerable<FormFile>
.When this is the case, the ApiExplorer layer will produce 6 distinct parameter descriptions for each property within the IFormFile type:
This is distinct from the descriptions that are generated for minimal APIs which correctly produces the correct binding sources for form file parameters (see https://github.com/dotnet/aspnetcore/blob/main/src/Mvc/Mvc.ApiExplorer/src/EndpointMetadataApiDescriptionProvider.cs#L305). We should update the MVC implementation of ApiExplorer to do the right thing.
The text was updated successfully, but these errors were encountered: