Hi team, I currently have a dev working on pactflo...
# pactflow
q
Hi team, I currently have a dev working on pactflow. Currently between the two services BFF and BE when running on the CI pipeline the deployment is successful , however when using the Pactflow UI under viewing the contract , i can see the green check under verification , however the api shows a warning symbol. I have observed on a example contract (petstore) each API request has a green tick instead of the warning symbol. The questions i have are 1. Does the Warning symbol invalidate the test? i.e it doesn't confirm it is passing nor failing. 2. is it a false positive? , the dev thinks because its passing verification, it is technically passing? 3. The Devs comments on resolving the warning - The Spectral ruleset requires Authorization, Content-Type and Accept headers to be explicitly defined so we can’t remove Content-Type from the API spec. Removing it from the BFF Pact causes contract verification to fail but keeping it gives the Pact test warning because the GET has no request body/MIME type to consume. Since the contract verification passes, looks like we’ll have to ignore this Pact test warning unless the ruleset is changed. 4. Whats the best solution for the issues highlighted above
m
A warning is just that - it doesn’t fail the test, but is worth looking into. In this case it’s non fatal - the user specified an input header that was ignored by the provider, and the rest of the test matched (indicating either a superflous header by the consumer, or an incorrectly documented provider)
If I read the error right, in this case the API spec does not have content-type defined, but the consumer does. The resolution is to add the content-type header to the API spec
q
ah okay thanks, the warning is present on the Consumer
👍 1