Closed uglyog closed 2 years ago
Initial models to support this have been added to Pact-Rust. Sample JSON file format:
{
"consumer": {
"name": "consumer"
},
"interactions": [
{
"description": "Test Interaction",
"key": "a0395223ce6c542b",
"providerStates": [
{
"name": "Good state to be in"
}
],
"request": {
"description": "Request Message",
"key": "eb97728e3ed8475f",
"contents": {
"contentType": "application/json",
"encoded": false,
"content": {
"a": "1234-1234"
}
},
"type": "Asynchronous/Messages"
},
"response": [
{
"description": "Message Response",
"key": "eb97728e3ed8475f",
"contents": {
"contentType": "application/json",
"encoded": false,
"content": {
"a": "1234-1234"
}
},
"type": "Asynchronous/Messages"
}
],
"type": "Synchronous/Messages"
}
],
"metadata": {
"pactSpecification": {
"version": "4.0"
}
},
"provider": {
"name": "write_pact_test_provider"
}
}
What does the key do?
What does the key do?
Sweet!
I can't see this documented here https://github.com/pact-foundation/pact-specification/tree/version-4 Ron, should it be there now also?
Now documented in the main readme
Synchronous messages support a scheme were a request message is sent (via some messaging mechanism) and then a number response messages are expected back (could be from a different messaging mechanism, like a request is sent to one queue and the response comes back from another).