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.
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.