Open natotthomer opened 1 year ago
Do you have a ruby class that you could specify there? like Image
or something?
Hmmm, that's a thought. But it's coming in as a binary string, I would not think that would map well onto the Image
class. It's just a pure blob. Eventually those objects get saved in the DB as ActiveRecord attachments.
it's a "pure blob" but it's still transferred via HTTP as a string, I still think it should be defined as a ruby class not in the API gem. Say it's a JPEG blog, then you create IncomingJpegBlob
or something that would digest it.
I'm sorry, I can't think of anything else.
I have a POST request that I'm documenting that accepts a number of parameters, including one called
images
which is an array of binary files (image files). If I was documenting a param that's an array of a basic type, I'd write something likeparam :abc, Array, of: String, desc: "abc param description", required: true
. I'm not even sure how to annotate a binary on its own let alone an array of binaries.TLDR: How does one annotate binaries as an incoming param to a POST or PATCH request?