We have an API with an endpoint that handles file uploads. The endpoint accepts multipart/form-data requests with two parts being a json content in the first part and binary file data in the second part.
We would like to give a request sample to the first (JSON) part.
We use openapi 3.0.0 spec, the request definition looks like this:
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
meta:
$ref: './meta.schema.json'
attachment:
type: string
format: binary
required: true
required:
- meta
- attachment
encoding:
meta:
contentType: application/json; charset=utf-8
The meta schema contains an example, and it renders correctly if the request body is application/json.
Are we doing something wrong or ReDoc does not support our use case? Thanks!
You're doing nothing wrong. ReDoc just doesn't support your use case yet.
@RomanGotsiy Can I make PR to fix this issue? Because I need this feature too. Please, can you explain, what is the problem with it? And where I can fix that?
Thank you.
I am seeing the same issue described by gyszalai on Nov 10, 2018
Here is what i tried to do:
Is there a third way that I need to do this to get the fix?
I noticed that the PR that would supposedly implement support for this was closed without merging. Any reason for that?
Most helpful comment
@RomanGotsiy Can I make PR to fix this issue? Because I need this feature too. Please, can you explain, what is the problem with it? And where I can fix that?
Thank you.