-
Notifications
You must be signed in to change notification settings - Fork 6k
[python] Support binary data in body #10861
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
The files I am using is our own project that uses swagger-codegen, and it is only to help you understand where the problem is: We sanitize body here:
Which checks body content here:
This wouldn't allow for data in body. Also this will also needs to be fixed in
And we also need to fix it in https://github.com/unofficial-memsource/memsource-cli-client/blob/master/memsource_cli/rest.py#L270-L278
It's just an idea, I think i might have missed something. |
Description
API expects data send as
application/octet-stream
in the body of the request.Swagger-codegen version
latest, it has never been working.
Swagger declaration file content or url
There are body sanitization checks that do not allow application/octet-stream
Command line used for generation
java -jar swagger-codegen-latest.jar generate -i <path to openapi spec> -l python
Steps to reproduce
api_client.py
andrest.py
as part ofgenerate
command.Content-Type: application/octet-stream
and send data in bodyRelated issues/PRs
There is similar problem reported on JAVA language as well #669
Suggest a fix/enhancement
At the moment we don't have any working patch.
The text was updated successfully, but these errors were encountered: