Swagger has a stronger concept of media types (aka MIME types) than the original Pacto contracts. I think a good first step towards better support in Swagger is to allow it to validate that a request or response matches a specified media type. Each media type could have a validator, with a few common ones built-in (e.g. a CSV validator for "text/csv", a text validator for "text/plain; charset=utf-8"). Additional types could be supported via plugins.
Swagger has a stronger concept of media types (aka MIME types) than the original Pacto contracts. I think a good first step towards better support in Swagger is to allow it to validate that a request or response matches a specified media type. Each media type could have a validator, with a few common ones built-in (e.g. a CSV validator for "text/csv", a text validator for "text/plain; charset=utf-8"). Additional types could be supported via plugins.
That would partially solve https://github.com/thoughtworks/pacto/issues/150 and prior requests to support XML.