Multipart request body example #165
Description
Hi, maybe I just don't get it right, but how do I provide Examples for a Post action that accepts both application/json and multipart/form-data? As well, it seems that I have to provide an extra "fake" required body parameter comment just to provide an extra mime supported (multipart/form-data in my case)
No feedback/error from parsing components is a nightmare, HOURS getting spent for trying out absolutely legal strings to go for an example.
So, imagine a multipart/form-data request with some extra parameters with it:
public static string multipartExample =
@"---------------------------acebdf13572468
ParamaterOne: 'Some App-Specific Data'
ParameterTwo: { ItemOne: 'one', ItemTwo: 'two' }
ParameterThree: ['1','2','3']
Content-Disposition: 'form-data'; name='fieldNameHere'; filename='AnnualReport.docx'
Content-Type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
<@includeC:\Users\Anderssen\Desktop\AnnualReport.docx@>
---------------------------acebdf13572468";
So, the string above is absolutely valid and can be used to fulfill the request, yet it would not go through the CSharpAnnotations.
Any help will be highly appreciated!
Thanks