Skip to content

Instantly share code, notes, and snippets.

@abhayachauhan
Created May 21, 2015 11:21
Show Gist options
  • Save abhayachauhan/68e802898b3d566f8acb to your computer and use it in GitHub Desktop.
Save abhayachauhan/68e802898b3d566f8acb to your computer and use it in GitHub Desktop.
{
"provider": {
"name": "Event API"
},
"consumer": {
"name": "Consumer"
},
"interactions": [
{
"description": "a request to retrieve all events",
"provider_state": "there are events with ids '45D80D13-D5A2-48D7-8353-CBB4C0EAABF5', '83F9262F-28F1-4703-AB1A-8CFD9E8249C9' and '3E83A96B-2A0C-49B1-9959-26DF23F83AEB'",
"request": {
"method": "get",
"path": "/events",
"headers": {
"Accept": "application/json"
}
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json; charset=utf-8"
},
"body": [
{
"eventId": "45d80d13-d5a2-48d7-8353-cbb4c0eaabf5",
"timestamp": "2014-06-30T01:37:41.0660548",
"eventType": "SearchView"
},
{
"eventId": "83f9262f-28f1-4703-ab1a-8cfd9e8249c9",
"timestamp": "2014-06-30T01:37:52.2618864",
"eventType": "DetailsView"
},
{
"eventId": "3e83a96b-2a0c-49b1-9959-26df23f83aeb",
"timestamp": "2014-06-30T01:38:00.8518952",
"eventType": "SearchView"
}
]
},
"responseMatchingRules": {
"body": {
"$.[2].eventId": {
"match": "type"
},
"$.[0].eventId": {
"match": "type"
},
"$.[1].eventId": {
"regex": "[0-9A-F]{36}"
}
}
}
}
],
"metadata": {
"pactSpecificationVersion": "1.1.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment