From: Kai Moritz Date: Sat, 11 Oct 2025 20:37:57 +0000 (+0200) Subject: refactor: Refined pact (wording, examples, states) X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=b2bf161fa71acd4128b040ebb81af65fc1509cac;p=demos%2Fkafka%2Fchat refactor: Refined pact (wording, examples, states) --- diff --git a/ChatroomService-ChatBackendController.json b/ChatroomService-ChatBackendController.json index e5f7dc40..97c6e3b5 100644 --- a/ChatroomService-ChatBackendController.json +++ b/ChatroomService-ChatBackendController.json @@ -11,18 +11,63 @@ "name": "there are 10 shards" }, { - "name": "chatroom with ID \"5c73531c-6fc4-426c-adcb-afc5c140a0f7\" exists in shard \"2\"" + "name": "the server is responsible for shard 2" + }, + { + "name": "chatroom 5c73531c-6fc4-426c-adcb-afc5c140a0f7 exists in shard 2" } ], "request": { "headers": { "X-Shard": [ - "6" + "2" ] }, "method": "GET", "path": "/5c73531c-6fc4-426c-adcb-afc5c140a0f7" }, + "response": { + "body": { + "content": { + "id": "5c73531c-6fc4-426c-adcb-afc5c140a0f7", + "name": "FOO", + "shard": 2 + }, + "contentType": "application/json", + "encoded": false + }, + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "status": 200 + }, + "type": "Synchronous/HTTP" + }, + { + "description": "a request for /7f59ec77-832e-4a17-8d22-55ef46242c17", + "pending": false, + "providerStates": [ + { + "name": "there are 10 shards" + }, + { + "name": "the server is responsible for shard 2" + }, + { + "name": "chatroom 7f59ec77-832e-4a17-8d22-55ef46242c17 does not exists in shard 2" + } + ], + "request": { + "headers": { + "X-Shard": [ + "2" + ] + }, + "method": "GET", + "path": "/7f59ec77-832e-4a17-8d22-55ef46242c17" + }, "response": { "status": 404 }, @@ -36,7 +81,10 @@ "name": "there are 10 shards" }, { - "name": "chatroom with ID \"5c73531c-6fc4-426c-adcb-afc5c140a0f7\" exists in shard \"2\"" + "name": "the server is responsible for shard 2" + }, + { + "name": "chatroom 5c73531c-6fc4-426c-adcb-afc5c140a0f7 exists in shard 2" } ], "request": { @@ -85,7 +133,10 @@ "name": "there are 10 shards" }, { - "name": "there is no chatroom at all" + "name": "the server is responsible for shard 2" + }, + { + "name": "there are no chatrooms available at all in shard 2" } ], "request": {