-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add support for InputStream #292
Add support for InputStream #292
Conversation
Fabrikt already offers support for `ByteArray`, but when dealing with large files, for example, the usage of `ByteArray` puts too much pressure in memory. This MR provides `BYTEARRAY_AS_INPUTSTREAM`. A new `--type-overrides` that allows to provide an `InputStream` when dealing with binary data.
Thanks for the contribution. It'll be Monday before I get to look at this. Unless @averabaq can handle it before then |
This is a good one that's been on the radar for some time. I'll try to put some eyes on it over the weekend. Thank you so much for this @ctasada |
The server side code-generation looks good to me, no objections on this. On the client side, however, the code generated is incorrect:
Supporting streaming on the client side is not that simple. This is only for
I can't proceed as is, sorry. Let's see what @cjbooms thinks about it next week. |
Option 2 sounds good to me. Allow it on server-side generation only |
What is need to get this across the line @averabaq ? Could it be merged as is with the configuration option as protection against the client side generation being incorrect? |
Yes, I didn't make it go through because I was waiting for getting a PR ready with the required changes, but haven't had the chance to work on it. We can proceed and release it to unblock @ctasada. I'll try to add the cli changes later on |
Fabrikt already offers support for
ByteArray
, but when dealing with large files, for example, the usage ofByteArray
puts too much pressure in memory.This MR provides
BYTEARRAY_AS_INPUTSTREAM
. A new--type-overrides
that allows to provide anInputStream
when dealing with binary data.