From: Kai Moritz Date: Sat, 11 Oct 2025 13:26:49 +0000 (+0200) Subject: feat: First version of a pact for the existing interaction X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=3f62f442fa6cdf81d3a49e55a481fc3374ed852c;p=demos%2Fkafka%2Fchat feat: First version of a pact for the existing interaction --- diff --git a/frontend.ChatroomService-backend.json b/frontend.ChatroomService-backend.json new file mode 100644 index 00000000..6f643b31 --- /dev/null +++ b/frontend.ChatroomService-backend.json @@ -0,0 +1,114 @@ +{ + "consumer": { + "name": "frontend.ChatroomService" + }, + "interactions": [ + { + "description": "a request for /1", + "pending": false, + "providerStates": [ + { + "name": "chatroom with ID \"1\" exists in shard \"7\"" + } + ], + "request": { + "headers": { + "X-Shard": [ + "6" + ] + }, + "method": "GET", + "path": "/1" + }, + "response": { + "status": 404 + }, + "type": "Synchronous/HTTP" + }, + { + "description": "a request for /list", + "pending": false, + "providerStates": [ + { + "name": "no chatrooms are known" + } + ], + "request": { + "method": "GET", + "path": "/list" + }, + "response": { + "body": { + "content": [], + "contentType": "application/json", + "encoded": false + }, + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "status": 200 + }, + "type": "Synchronous/HTTP" + }, + { + "description": "a request for /list", + "pending": false, + "providerStates": [ + { + "name": "some chatrooms are known" + } + ], + "request": { + "method": "GET", + "path": "/list" + }, + "response": { + "body": { + "content": [ + { + "id": "1", + "name": "foo", + "shard": 7 + } + ], + "contentType": "application/json", + "encoded": false + }, + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "matchingRules": { + "body": { + "$": { + "combine": "AND", + "matchers": [ + { + "match": "type", + "min": 1 + } + ] + } + } + }, + "status": 200 + }, + "type": "Synchronous/HTTP" + } + ], + "metadata": { + "pactRust": { + "ffi": "0.4.28", + "models": "1.3.5" + }, + "pactSpecification": { + "version": "4.0" + } + }, + "provider": { + "name": "backend" + } +} \ No newline at end of file