[Minimal API] IFormFile does not bind when using WithOpenApi extension method #47526
Closed
1 task done
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
bug
This issue describes a behavior which is not expected - a bug.
Is there an existing issue for this?
Describe the bug
I'm using .NET 7.0.4. I have defined the following endpoints:
When I invoke the first one, everything works as expected. However, when I call the endpoint that uses WithOpenApi, I get an exception:
I have also tried adding the
[FromForm]
attribute to theIFormFile
parameter, but with no luck.Expected Behavior
IFormFile
should work even when using theWithOpenApi
extension method.Steps To Reproduce
Minimal repro: https://github.com/marcominerva/FileUploadIssue
Exceptions (if any)
No response
.NET Version
7.0.202
Anything else?
No response
The text was updated successfully, but these errors were encountered: