-
Notifications
You must be signed in to change notification settings - Fork 6k
CSharp code generator - body parameter not passed on to invokeBinaryAPI #734
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
Comments
For BinaryData, do you expect its type to be byte array (byte[]) instead of string ? invokeBinaryAPI will be removed after switching to RestSharp #700 |
@boazsapir - you've opened a few issues so far, and thank you for that. It definitely helps us improve the project. However, you tend to share your annotations from what I suspect is PHP (specifically swagger-PHP). That ends up being a bit less useful because it assumes that the output of the library is correct, but what's really being parsed is the Swagger definition you get from it. In the future, please make sure to include those so we can eliminate the option that the definition is not being produced properly rather than the codegen not processing it properly. |
@webron no problem, here is the Swagger definition:
|
@wing328 yes, I expect the type of BinaryData to be byte array |
@boazsapir Currently, csharp-restsharp only supports model (JSON) as body. As you've confirmed, the master branch does not work with binary body either. I'll see what I can do to address the issue in the csharp_restsharp branch. |
@boazsapir - for what it's worth, file uploads using |
Thank you for the clarification. I will open an issue in swagger-spec with my proposal how the definition for byte format should be |
@boazsapir C# API client now supports |
I defined a binary parameter in the 'body' part of a POST request whose response is also binary
In the generated code, the parameter is:
(see also CSharp code generator - generated function's response type is string instead of byte[] #733 for a related issue).
The generated code (note that the 5th parameter to invokeBinaryAPI () is null):
The text was updated successfully, but these errors were encountered: