-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSharp code generator - generated function's response type is string instead of byte[] #733
Comments
In your example, is the HTTP response body/content encoded in base64 and you would expect the method to automatically convert the base64-encoded string to byte array using Convert.FromBase64String ? Related discussion: OAI/OpenAPI-Specification#50 |
@wing328 in fact my response content is binary, not base64 encoded |
@boazsapir OK. RESTSharp supports sending binary data so I'll try to address the issue in the csharp_restsharp branch. |
@boazsapir - what's the |
|
@boazsapir - hope you saw my comment regarding |
@boazsapir currently the format |
Fixed by #1864 |
@boazsapir when you've time, please kindly help perform a test. Closing this issue for the time being. |
I defined the response data type of a POST api request as binary, according to the Swagger spec (type="string", format="byte"):
The generated CSharp API call function has "string" as return type, and therefore apiInvoker.invokeAPI() will be called instead of apiInvoker.invokeBinaryAPI().
The generated code:
The text was updated successfully, but these errors were encountered: