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

Add Support for Binary Data in Responses #831

Open
dethell opened this issue Apr 4, 2024 · 1 comment
Open

Add Support for Binary Data in Responses #831

dethell opened this issue Apr 4, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@dethell
Copy link
Collaborator

dethell commented Apr 4, 2024

Per the OpenApi spec binary responses are allowed:

https://swagger.io/docs/specification/describing-responses/

v3 says to use "type": "string" but with "format": "binary".
v2 says to use just "type": "file"

Not sure how best to have an endpoint load and respond with binary data but perhaps if a mock had base64 data in a string the endpoint could then decode it before returning the response.

@pmcelhaney
Copy link
Owner

pmcelhaney commented Apr 4, 2024

Yeah I think it could be either a Base64 encoded string or a Blob or a stream.

@pmcelhaney pmcelhaney added the enhancement New feature or request label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants