-
Notifications
You must be signed in to change notification settings - Fork 9
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
Support stream or file content types #20
Comments
Lots of possibilities here. Simplest would be to support
That ignores entirely the question of Supporting an arbitrary content type would be more interesting. I can't figure out if Open API even supports it. But one could imagine a new And/or we could just support a separate There's also the question of how clients and servers should deal with it. Byte arrays are the most obvious solution, but that might not work well for huge amounts of data. Would we need a And remember: Keep it simple. |
@ddunkin, any additional thoughts here? How important is this to you? Which of my ideas do you like, if any? I confess I'm worried about the additional burden on client and server generators, and on the unanswered questions around huge streams of data. |
I still need this. I like:
Byte array vs stream seems like a detail of the generator, not the API definition. Implementing |
Thanks for the feedback. In .NET, Though I could always just use a different type for |
|
Yeah, the |
A stream is useful in the context of a response body, but not as a member of JSON response that's already been loaded entirely into memory, so it wouldn't bother me if |
We could also support |
This issue will be resolved when |
Sometimes service methods return binary data, e.g. images or zip files. There should be a way to model these methods in FSD.
OpenAPI 2 had a
file
type. OpenAPI 3 uses astring
with a binary format.https://swagger.io/docs/specification/data-models/data-types/#file
The text was updated successfully, but these errors were encountered: