pact-foundation / pact-reference

Reference implementations for the pact specifications
https://pact.io
MIT License
91 stars 46 forks source link

JSON formats other than application/json are not supported #224

Closed mefellows closed 1 year ago

mefellows commented 1 year ago

See https://github.com/pact-foundation/pact-js/issues/963.

Given an expected POST body content type of application/vnd.dog.farm+json, when the actual request is made, the following error occurs:

  Mock server failed with the following mismatches:

        0) The following request was incorrect:

                PUT /dogs

                         1.0 Expected body with content type application/json but was application/vnd.dog.farm+json

It looks like all JSON-like types are e to application/json, and then compared to the incoming narrow type.

mefellows commented 1 year ago

The latest version of Pact JS (and the core) should have this fix in it - could you please re-test?