-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
I have an endpoint that will return a octet-stream as follows, but the response will be json instead of octet-stream
responses:
"200":
description: The requested properties are successfully returned.
content:
application/octet-stream:
schema:
type: string
format: binary
x-content-type: application/octet-stream
example: # Sample object
externalValue: '/Users/xxx/Downloads/nodejs-server-mock2/README.md'
With the above schema, the response is
curl -v -X GET "http://localhost:5000/api/objects" -H "accept: application/octet-stream" -H "X: fasdfa"
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 5000 (#0)
> GET /api/objects HTTP/1.1
> Host: localhost:5000
> User-Agent: curl/7.64.1
> accept: application/octet-stream
> X-MSTR-ISERVER-SESSION: fasdfa
>
< HTTP/1.1 200 OK
< x-powered-by: jormaechea/open-api-mock
< Vary: Origin
< Access-Control-Allow-Credentials: true
< Content-Type: application/json; charset=utf-8
< Content-Length: 72
< ETag: W/"48-moCYJiPDoNqlzQ7AhOmaHZSX3cU"
< Date: Tue, 20 Apr 2021 00:52:10 GMT
< Connection: keep-alive
<
* Connection #0 to host localhost left intact
{"externalValue":"/Users/xxx/Downloads/nodejs-server-mock2/README.md"}* Closing connection 0
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed