Skip to content

Instantly share code, notes, and snippets.

@danilat
Created February 29, 2020 07:59
Show Gist options
  • Save danilat/15528de7df3a5c4ad261eb60b595a421 to your computer and use it in GitHub Desktop.
Save danilat/15528de7df3a5c4ad261eb60b595a421 to your computer and use it in GitHub Desktop.
{
"consumer": {
"name": "frontend"
},
"provider": {
"name": "api"
},
"interactions": [
{
"description": "get all the employees",
"providerState": "an authorized admin",
"request": {
"method": "get",
"path": "/v1/employees"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json; charset=utf-8"
},
"body": {
"employees": [
{
"id": "411b932d-8bda-490b-85c6-9a74539619e5",
"name": "Dani",
"surname_1": "Latorre",
"taxid": "Y5834312P",
"status": "pending"
}
],
"meta": {
"pagination": {
"total_items": 1
}
}
},
"matchingRules": {
"$.body.employees": {
"min": 1
},
"$.body.employees[*].*": {
"match": "type"
},
"$.body.meta.pagination.total_items": {
"match": "type"
}
}
}
}
],
"metadata": {
"pactSpecification": {
"version": "2.0.0"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment