Skip to content

Mechanism to indicate a byte stream response #297

@ahl

Description

@ahl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions