From: Kai Moritz Date: Sat, 11 Oct 2025 22:18:20 +0000 (+0200) Subject: feat: Introduced V2 ChatroomService -- COPY X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=890322280b9b9637478e2536485b67894696c0c4;p=demos%2Fkafka%2Fchat feat: Introduced V2 ChatroomService -- COPY --- diff --git a/ChatroomServiceV1-ChatBackendController.json b/ChatroomServiceV1-ChatBackendController.json new file mode 100644 index 00000000..abad220d --- /dev/null +++ b/ChatroomServiceV1-ChatBackendController.json @@ -0,0 +1,238 @@ +{ + "consumer": { + "name": "ChatroomService" + }, + "interactions": [ + { + "description": "a request for /5c73531c-6fc4-426c-adcb-afc5c140a0f7", + "pending": false, + "providerStates": [ + { + "name": "there are 10 shards" + }, + { + "name": "the server is responsible for shard 2" + }, + { + "name": "chatroom 5c73531c-6fc4-426c-adcb-afc5c140a0f7 exists in shard 2" + } + ], + "request": { + "headers": { + "Accept": [ + "application/json" + ], + "X-Shard": [ + "2" + ] + }, + "matchingRules": { + "header": { + "Accept": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + } + } + }, + "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": { + "Accept": [ + "application/json" + ], + "X-Shard": [ + "2" + ] + }, + "matchingRules": { + "header": { + "Accept": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + } + } + }, + "method": "GET", + "path": "/7f59ec77-832e-4a17-8d22-55ef46242c17" + }, + "response": { + "status": 404 + }, + "type": "Synchronous/HTTP" + }, + { + "description": "a request for /list", + "pending": false, + "providerStates": [ + { + "name": "there are 10 shards" + }, + { + "name": "the server is responsible for shard 2" + }, + { + "name": "chatroom 5c73531c-6fc4-426c-adcb-afc5c140a0f7 exists in shard 2" + } + ], + "request": { + "headers": { + "Accept": [ + "application/json" + ] + }, + "matchingRules": { + "header": { + "Accept": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + } + } + }, + "method": "GET", + "path": "/list" + }, + "response": { + "body": { + "content": [ + { + "id": "5c73531c-6fc4-426c-adcb-afc5c140a0f7", + "name": "FOO", + "shard": 2 + } + ], + "contentType": "application/json", + "encoded": false + }, + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "matchingRules": { + "body": { + "$": { + "combine": "AND", + "matchers": [ + { + "match": "type", + "min": 1 + } + ] + } + } + }, + "status": 200 + }, + "type": "Synchronous/HTTP" + }, + { + "description": "a request for /list", + "pending": false, + "providerStates": [ + { + "name": "there are 10 shards" + }, + { + "name": "the server is responsible for shard 2" + }, + { + "name": "there are no chatrooms available at all in shard 2" + } + ], + "request": { + "headers": { + "Accept": [ + "application/json" + ] + }, + "matchingRules": { + "header": { + "Accept": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + } + } + }, + "method": "GET", + "path": "/list" + }, + "response": { + "body": { + "content": [], + "contentType": "application/json", + "encoded": false + }, + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "status": 200 + }, + "type": "Synchronous/HTTP" + } + ], + "metadata": { + "pactRust": { + "ffi": "0.4.28", + "models": "1.3.5" + }, + "pactSpecification": { + "version": "4.0" + } + }, + "provider": { + "name": "ChatBackendController" + } +} \ No newline at end of file