Skip to content
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

Mechanism to indicate a byte stream response #297

Closed
ahl opened this issue Mar 13, 2022 · 1 comment
Closed

Mechanism to indicate a byte stream response #297

ahl opened this issue Mar 13, 2022 · 1 comment

Comments

@ahl
Copy link
Collaborator

ahl commented Mar 13, 2022

If a consumer wants to return a byte stream, it must currently use the Response<Body> return type from the handler of an endpoint. That response can have any content, any status code, any headers, etc. and its OpenAPI description reflects that lack of structure.

It would be useful to have a way for an endpoint to return a byte stream for a particular success response code; in this case, the OpenAPI description could enumerate a streaming response media type ("application/octet-stream") while indicating structured ("application/json") for error responses.

@ahl
Copy link
Collaborator Author

ahl commented Aug 1, 2022

Closed by #310

@ahl ahl closed this as completed Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant