spring-cloud / spring-cloud-contract

Support for Consumer Driven Contracts in Spring
https://cloud.spring.io/spring-cloud-contract
Apache License 2.0
720 stars 440 forks source link

RestDocs should use JSON matching with JSON Content-type #116

Closed Kaali closed 7 years ago

Kaali commented 8 years ago

spring-cloud-contract-wiremock RestDocs stub generator uses WireMock equalTo matcher for JSON instead of equalToJson. Which makes the stubs near unusable as different applications can generate completely different JSON for the same data.

It would be nice if WireMockSnippet would check the Content-type and generate the request matcher accordingly.

patrice-conil commented 7 years ago

Hi, +1 for me. This enhancement will be of a great help. Patrice