RicoSuter/NSwag

OpenAPI 3.0.1 upload/download file example

Open

#2,495 opened on 2019年10月30日

GitHub で見る
 (25 comments) (13 reactions) (0 assignees)C# (1,189 forks)batch import
format: OpenAPI 3help wanted

Repository metrics

Stars
 (6,291 stars)
PR merge metrics
 (30d に merged PR はありません)

説明

Do you have an example of what an ASP.Net Core 3.0 API operation that uploads and downloads a file and what the OpenAPI 3.0.1 yaml should look like in order to properly generate a client using NSwag code generator?

I've tried every combination I can think of, and nothing seems to work. Either I get errors trying to deserialize to a FileContent type, or I get errors about not finding the Content boundary or else the client has random parameters that aren't used or a myriad of other issues. At this point, my yaml is identical to what's on the OpenApi documentation page, but this doesn't work, either: https://swagger.io/docs/specification/describing-request-body/file-upload/ I just need a working example to go off of so I can stop guessing.

コントリビューターガイド