{ "consumer": { "name": "Pact Broker Client" }, "provider": { "name": "Pactflow" }, "interactions": [ { "description": "a request for the index resource", "request": { "method": "get", "path": "/", "headers": { "Accept": "application/hal+json" } }, "response": { "status": 200, "headers": { "Content-Type": "application/hal+json;charset=utf-8" }, "body": { "_links": { "pb:webhooks": { "href": "http://localhost:1235/HAL-REL-PLACEHOLDER-PB-WEBHOOKS" }, "pb:pacticipants": { "href": "http://localhost:1235/HAL-REL-PLACEHOLDER-PB-PACTICIPANTS" }, "pb:pacticipant": { "href": "http://localhost:1235/HAL-REL-PLACEHOLDER-PB-PACTICIPANT-{pacticipant}" } } }, "matchingRules": { "$.body._links.pb:webhooks.href": { "match": "regex", "regex": "http:\\/\\/.*" }, "$.body._links.pb:pacticipants.href": { "match": "regex", "regex": "http:\\/\\/.*" }, "$.body._links.pb:pacticipant.href": { "match": "regex", "regex": "http:\\/\\/.*{pacticipant}" } } } }, { "description": "a request to create a webhook for a team", "providerState": "a team with UUID 2abbc12a-427d-432a-a521-c870af1739d9 exists", "request": { "method": "post", "path": "/HAL-REL-PLACEHOLDER-PB-WEBHOOKS", "headers": { "Content-Type": "application/json", "Accept": "application/hal+json" }, "body": { "description": "a webhook", "events": [ { "name": "contract_content_changed" } ], "request": { "url": "https://webhook", "method": "POST", "headers": { "Foo": "bar", "Bar": "foo" }, "body": { "some": "body" } }, "teamUuid": "2abbc12a-427d-432a-a521-c870af1739d9" } }, "response": { "status": 201, "headers": { "Content-Type": "application/hal+json;charset=utf-8" }, "body": { "description": "a webhook", "teamUuid": "2abbc12a-427d-432a-a521-c870af1739d9", "_links": { "self": { "href": "http://localhost:1234/some-url", "title": "A title" } } }, "matchingRules": { "$.body.description": { "match": "type" }, "$.body._links.self.href": { "match": "regex", "regex": "http:\\/\\/.*" }, "$.body._links.self.title": { "match": "type" } } } } ], "metadata": { "pactSpecification": { "version": "2.0.0" } } }