A pact from past traffic, or from mock scenarios with no traffic
Generate a pact from a mock no longer needs a new run. Choose Use past traffic to build the pact from calls the consumer already made to the hosted mock, or Build from scenarios to write a contract before any consumer code exists. See Other sources.
- Past traffic. Pick a window (Last hour to Everything kept) and a caller (any, one API key, or calls made with none). The page says how many calls the range holds and how long captures are kept. One generation reads the newest 5,000 calls and says so when there are more. Environment label is shown, disabled: captured calls carry no environment label yet.
- Operations × scenarios. Every operation of the spec against every scenario of the mock — the
four built-in ones and those saved on the version. Each tick becomes one interaction whose provider
state is the scenario, the same name a consumer sends as
X-Mock-Scenario. Every happy-path answer is ticked to start with. A pair the mock cannot serve as one fixed answer is a dash that says why: the scenario does not change the operation, answers by rules or templates, is off-spec, or answers what the spec does not declare. - The same report. Both sources go through
POST …/pact-broker/pacts/generate(trafficorscenariosin place ofsession) and give the report a recording gives, so Captured calls, the strictness choices, overrides and Review pact work unchanged.report.sourcesays where the interactions came from. Two new reads,GET …/pacts/generate/trafficand…/pacts/generate/scenarios, feed the page and your scripts.
