When using type any, the generator creates an "Object" on java side. This makes no sense, as an object cannot be treated correctly. Is it a byte stream? Is it a string? Most converters will fail even before the function is being called.
It's clearer if the parameter is an InputStream. Even if the object is a valid json, the stream can be read to a string and converted correctly.
The same yields for the response, where a StreamingOutput object should be used, so any byte data can be streamed to the client. If Object is returned, most convertes will fail and nothing will be send to the client.
Currently the InputStream variant is only implemented if used with "application/octet-stream". But in my opinion it should be used whenever type "any" occurs.
When using type any, the generator creates an "Object" on java side. This makes no sense, as an object cannot be treated correctly. Is it a byte stream? Is it a string? Most converters will fail even before the function is being called. It's clearer if the parameter is an InputStream. Even if the object is a valid json, the stream can be read to a string and converted correctly.
The same yields for the response, where a StreamingOutput object should be used, so any byte data can be streamed to the client. If Object is returned, most convertes will fail and nothing will be send to the client.
Currently the InputStream variant is only implemented if used with "application/octet-stream". But in my opinion it should be used whenever type "any" occurs.
I added a pull request with a small fix.