You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately one of the hacky fixes we were forced to add to our OpenAPI spec was setting all endpoints as application/json first, and multipart/form-data second (if needed).
This is due to all the other generators creating completely different code depending on the request content type (multipart/form-data creating API methods where all arguments are listed, vs a single typed object).
This does not appear to be the case for the Golang generator, but I don't see that it correctly switches to multipart/form-data when a file upload is detected.
Yes, all of our currently supported SDKs had their mustache templates changed to support what I listed above. I only linked PHP and Node but we did this for all the other languages as well.
Activity
jtreminio-dropbox commentedon Oct 11, 2023
Unfortunately one of the hacky fixes we were forced to add to our OpenAPI spec was setting all endpoints as
application/jsonfirst, andmultipart/form-datasecond (if needed).This is due to all the other generators creating completely different code depending on the request content type (
multipart/form-datacreating API methods where all arguments are listed, vs a single typed object).This does not appear to be the case for the Golang generator, but I don't see that it correctly switches to
multipart/form-datawhen a file upload is detected.We would need to apply the same logic to this new Golang SDK to consider it.
edit: I'm not great with Golang, so apologies upfront if your PR already does the above!
abhishekdas29 commentedon Oct 15, 2023
@jtreminio-dropbox - So are you saying that the auto generated files were manually overwritten in the PHP and node sdk?
jtreminio-dropbox commentedon Oct 16, 2023
Yes, all of our currently supported SDKs had their mustache templates changed to support what I listed above. I only linked PHP and Node but we did this for all the other languages as well.