Not sure which channel this should go in, but I ha...
# general
j
Not sure which channel this should go in, but I had a small issue with Pact using the Cypress adapter I had a question about. We use bi-directional contracts with Cypress to generate pacts on the frontend consumer. One of our providers uses a
API Base URL
in their OAS. When we try to generate Pacts with Cypress for it on the frontend, the entire path (include that base URL) is provided as the consumer contract. The issue is, Pactflow doesn't seem to match it with the base URL and were having to strip it from the JSON before pushing it up to Pactflow. ie • Consumer pact states the path is
service/v1/endpoint
• Provider states the base url is
service/v1
and the endpoint is
/endpoint
• Pactflow marks the two as incompatible UNLESS we strip the
service/v1
from the JSON generated by the Cypress Pact adapter before we push it to Pactflow Any ideas of a better solution that stripping?
m
We recently added
x-opc-config-base-path
as an option - https://docs.pactflow.io/docs/bi-directional-contract-testing/contracts/oas/configuration This should provide you a way to address this issue
(For next time, drop it in #CLS16AVEE as it’s not a Pact Broker feature - no worries for now)