Skip to main content

Compatibility Checks (breaking change detection)

When BDC contracts are published to Pactflow, the consumer contract (Pact file) will be verified against the Open API Specification (OAS). In essence, Pactflow will ensure that the consumer contract is a subset of what is in the OAS. I.e., it will check that all the interactions in the Pact file are valid for that OAS.

note

Pactflow can only make a determination based on the information it receives. If the consumer contract does not contain all the interactions the consumer uses, then the resulting checks may say it is safe to deploy when it could not be because the missing API calls may have breaking changes.

The detail screen for the BDC interaction has different tabs that display the contracts involved and the status of the verification. The interaction could be in an invalid (or failed) state due to the following three conditions:

  1. The provider self-verification test results indicate that they have failed. This means that the provider build ran some tests against the OAS and the result was a failure.
  2. The consumer Pact verification results have failed. This means the consumer Pact tests failed, and the consumer is not compatible with the published Pact file.
  3. The consumer Pact file is not compatible with the OAS.

Contract Comparison

This tab will display the details of the comparison between the Pact file and the OAS.

Contract Incompatibility Messages

Error MesssageDescription
Request accept header is incompatiblePact request's accept header content is incompatible with provider contract
Request misses authorization headerPact request's authorization header is missing
Request body is incompatiblePact request's body content is incompatible with provider contract
Request content type header is incompatiblePact request's content type header is incompatible with provider contract
Request header is incompatiblePact request's header content is incompatible with provider contract
Request contains unknown path or methodPact contains unknown request's path or method compared with provider contract
Request query is incompatiblePact request query content is incompatible with provider contract
Response body is incompatiblePact response's body content is incompatible with provider contract
Response body contains unknown informationPact response's body contains unknown content compared with provider contract
Response request is incompatiblePact response's request content is incompatible with provider contract
Reponse header contains unknown informationPact response's header contains unknown content compared with provider contract