cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
ssimm
Visitor

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!

1 ACCEPTED SOLUTION

Accepted Solutions
HKosova
Moderator

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

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


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

1 REPLY 1
HKosova
Moderator

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

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


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements