domaindrivendev / Swashbuckle.WebApi

Seamlessly adds a swagger to WebApi projects!
BSD 3-Clause "New" or "Revised" License
3.07k stars 679 forks source link

ParameterLocaation.FormData missing? #1336

Open joshmouch opened 4 years ago

joshmouch commented 4 years ago

I'm upgrading to the latest Swashbuckle and ASP.Net Core 3.0.

While upgrading my Swashbuckle filters, I'm having a hard time upgrading a filter that allows me to expose an IFormFile interface, and subsequently have the auto-generated client (based on the swagger definition) allow me to include a Stream type.

The way I did this before was by changing the parameter representing the IFormFile to: Type = "file" In = "formData"

However, I can no longer set In = "formData" because it's an enumeration, and FormData is not an option.

Thoughts?

ramondeklein commented 4 years ago

It would be nice if Swashbuckle would have a standard filter implementing a proper file-upload operation filter that handles IFormFile properly.

domaindrivendev commented 4 years ago

The latest version handles IFormFile automatically out-of-the-box so you don’t need a custom filter

ramondeklein commented 4 years ago

@domaindrivendev Great, just checked it and works flawlessly. 👍