Open honzajavorek opened 7 years ago
Currently the file
seems to be supported to some extent, but following doesn't work for an HTTP request:
consumes:
- multipart/form-data; boundary=CUSTOM-BOUNDARY
As it produces an error:
Validation failed. /paths/data/post has a file parameter,
so it must consume multipart/form-data or application/x-www-form-urlencoded
on line 1
I don't think Swagger adapter correctly supports
{"type":"file"}
in the request or response. It is a Swagger extension to the spec. Linking relevant docs (also mentioned in the Data Types section). Since this is something specific to a certain format, I think Dredd shouldn't be the one dealing with it. The Swagger adapter should take care of the specifics and pass on something which looks like raw HTTP request-response pair and which Dredd already understands.Real world example of usage in response can be seen in https://github.com/apiaryio/dredd/issues/883: