Forum Discussion

ssimm's avatar
ssimm
Visitor
4 years ago
Solved

OAS 3.0, file download, content type when content is not known in advance

Hello,

I am building a web service for uploading/downloading files. There is no restriction on the type of files.

 

In the OAS 3.0 specifications, under "describing responses" it has an example of downloading a .pdf file. (see "Response that Returns a File")

 

What do you put in content when you don't know in advance what kind of file the server will return?

The specifications for upload suggest that the schema: should be type:binary and format:binary, ok, but for the content type?

 

Thanks!

  • You can use application/octet-stream, which means "arbitrary binary data".

1 Reply

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    You can use application/octet-stream, which means "arbitrary binary data".