Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save benifietray/481220db194a8be0fcb57e3a487bba47 to your computer and use it in GitHub Desktop.
Save benifietray/481220db194a8be0fcb57e3a487bba47 to your computer and use it in GitHub Desktop.
Pact4sConsumer-Pact4sProvider_generators.json
{
"consumer": {
"name": "Pact4sConsumer"
},
"interactions": [
{
"description": "a request to say Goodbye",
"request": {
"method": "GET",
"path": "/goodbye"
},
"response": {
"status": 204
}
},
{
"description": "a request to say Hello",
"request": {
"body": {
"name": "harry"
},
"headers": {
"Content-Type": "application/json",
"other-header": "howdy"
},
"method": "POST",
"path": "/hello"
},
"response": {
"body": {
"hello": "harry"
},
"status": 200
}
},
{
"description": "a request to find a friend",
"providerStates": [
{
"name": "bob exists",
"params": {
"foo": "there"
}
}
],
"request": {
"generators": {
"path": {
"dataType": "STRING",
"expression": "/anyone-${foo}",
"type": "ProviderState"
}
},
"method": "GET",
"path": "/anyone-there"
},
"response": {
"body": {
"found": "bob"
},
"status": 200
}
}
],
"metadata": {
"pact-jvm": {
"version": "4.3.5"
},
"pactSpecification": {
"version": "3.0.0"
}
},
"provider": {
"name": "Pact4sProvider"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment