thoughtworks/pacto — pull request #162 by maxlinc (2014-12-17 22:30:24+00:00)
Title: Refactor: SwaggerContract

The previous support for Swagger converted the Swagger definition into a Pacto one. The Swagger class has a much richer model of the API than the legacy Pacto contracts, so doing that meant we lost a lot of useful data.

This changes things so there are now two subclasses of Pacto::Contract - Pacto::SwaggerContract and Pacto::LegacyContract. The SwaggerContract holds on to the underlying Swagger data. This will make both debugging and reporting easier (you can still access extended Swagger data for informational purposes), and will also make it easier to begin extending Pacto to support more advanced features that require Swagger.