swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.79k stars 6.02k forks source link

[C#] BUG generate csharp client library #10236

Open biasc opened 4 years ago

biasc commented 4 years ago
Description

We are using Swagger-codegen version 3.0.19

I have a simple API for upload file. When i generate the client library csharp, the code generated is not valid. The parameters is byte[] but should be Stream

this is the link of the API https://gist.github.com/biasc/c910bf26b28a6d76e95d6bc25eed041a

I have tried to edit the type from string to file and the parameter is generated as Stream but then it is not addedd correctly to the localVarFormParams, it is added like a string and not file

Command line used for generation

-jar "%Folder%swagger-codegen-cli-3.0.19.jar" generate -i http://localhost/demoApi/swagger/v1/swagger.json -l csharp -o "%Folder%Generated"

biasc commented 3 years ago

No prevision to fix the issue ?