Hello,
Our Swagger 2.0 specs include several services that pass and receive binary data in the body (type="string, format="byte"), represented by content-type application/octet-stream (with respective consumes and produces clauses).
When generating Java for these services, code generator treats input and output as String, which is not suitable for binary data.
It would be advisable to generate byte[] parameter, and also avoid serialization treatment.
I would consider contributing this code (for Java only), if you find this appropriate.
Thanks,
Michael.
Hello,
Our Swagger 2.0 specs include several services that pass and receive binary data in the body (type="string, format="byte"), represented by content-type application/octet-stream (with respective
consumesandproducesclauses).When generating Java for these services, code generator treats input and output as
String, which is not suitable for binary data.It would be advisable to generate
byte[]parameter, and also avoid serialization treatment.I would consider contributing this code (for Java only), if you find this appropriate.
Thanks,
Michael.