Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Multipart request body example #165

Open
@VasylSulakov

Description

@VasylSulakov

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions