Hi we have implemented consumer driven contract te...
# pactflow
o
Hi we have implemented consumer driven contract testing in our company but in some cases we need to implement bi-directional testing And while implementing it we have run into a problem. When using the pactflow publish-provider-contract it expects the provider to self verify the open api specification, is there a way to skip it?, Our providers are .Net based and we generate the specification from the provider code, so we dont need to self verify anything, and our verification should be ok automattically. We have tried with --skip-verification-success option but it stil expects to upload the verification info, and it says that contract is not compatible with provider codebase. Thanks
blobwave 2
y
no there isn’t, you can upload a text file with ok in it, or upload the provider contract for the test evidence
👍 1
I use the following option
Copy code
--verification-exit-code=0
and set the following here to the provider contract
Copy code
[--verification-results=VERIFICATION_RESULTS]
              # The path to the file containing the output from the
                verification process
      [--verification-results-content-type=VERIFICATION_RESULTS_CONTENT_TYPE]
              # The content type of the verification output eg. text/plain,
                application/yaml
We do that here are part of a design feedback loop https://github.com/pactflow/example-provider/blob/26ccbd26caf60c67c0e799e068bcb1ce2499b355/.github/workflows/ProviderDesignFeedback.yml#L45-L49 as shown in this demo https://docs.pactflow.io/docs/workshops/quick_starts/design_first#publish-your-provider-design-spec-to-pactflow it could be raised as a feature request on the pactflow roadmap https://github.com/pact-foundation/roadmap as we do have a good amount of users who use generated openapi specs, it may be something we want to roll into the cli. Like an
autogenerated
flag for example which defaults some options so the user doesn’t need to provide. It may even be nice to distinguish which services or contracts are hand written or autogenerated, for surveying your API landscape
o
thank you very much, thats exactly what i did in our azure pipelines before seeng your example, so at least i now know that its the correct aproach