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
{{ message }}
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
Kaiser1989
added a commit
to Kaiser1989/raml-for-jax-rs
that referenced
this issue
Feb 17, 2020
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.
The text was updated successfully, but these errors were encountered: