Azure / Azure/azure-functions-openapi-extension
multipart/form-data for a list of byte[]
- Dominant language
- C#
- Stars
- 388
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the issue**
Having something like this:
`
public class FileModel {
public byte[] File {get; set;}
}
`
When the type is a List the example generated in swagger ui shows like it was an application/json request, but when it is just FileModel it displays the ui for pick a file from your disk.
Also, when you set the type to just byte[], the ui displays it as a text instead of a file upload control.
**Expected behavior**
Swagger ui renders multiple file upload when having List. It also displays file upload for byte[]
Contributor guide
Research direction
Start by reproducing the models described in the issue and inspect the OpenAPI generation path and resulting Swagger UI schema for FileModel, List, and byte[]. Compare the generated request content types and file controls. Done means multipart/form-data renders the appropriate single or multiple file uploads, including for byte[].
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100