]> juplo.de Git - demos/kafka/chat/commitdiff
feat: Added pact between `UserService` and `ChatBackendController`
authorKai Moritz <kai@juplo.de>
Mon, 13 Oct 2025 18:25:59 +0000 (20:25 +0200)
committerKai Moritz <kai@juplo.de>
Mon, 13 Oct 2025 18:26:13 +0000 (20:26 +0200)
UserService-ChatBackendController.json [new file with mode: 0644]

diff --git a/UserService-ChatBackendController.json b/UserService-ChatBackendController.json
new file mode 100644 (file)
index 0000000..d9be1e7
--- /dev/null
@@ -0,0 +1,72 @@
+{
+  "consumer": {
+    "name": "UserService"
+  },
+  "interactions": [
+    {
+      "description": "a request to create a user",
+      "pending": false,
+      "providerStates": [
+        {
+          "name": "there are 10 shards"
+        },
+        {
+          "name": "the server is responsible for shard 2"
+        }
+      ],
+      "request": {
+        "headers": {
+          "Accept": [
+            "application/json"
+          ]
+        },
+        "matchingRules": {
+          "header": {
+            "Accept": {
+              "combine": "AND",
+              "matchers": [
+                {
+                  "match": "type"
+                }
+              ]
+            }
+          }
+        },
+        "method": "POST",
+        "path": "/user/create"
+      },
+      "response": {
+        "body": {
+          "content": {
+            "id": "5c73531c-6fc4-426c-adcb-afc5c140a0f7",
+            "shard": 2
+          },
+          "contentType": "application/json",
+          "encoded": false
+        },
+        "headers": {
+          "Content-Type": [
+            "application/json"
+          ]
+        },
+        "status": 200
+      },
+      "type": "Synchronous/HTTP"
+    }
+  ],
+  "metadata": {
+    "pact-js": {
+      "version": "16.0.0"
+    },
+    "pactRust": {
+      "ffi": "0.4.28",
+      "models": "1.3.5"
+    },
+    "pactSpecification": {
+      "version": "4.0"
+    }
+  },
+  "provider": {
+    "name": "ChatBackendController"
+  }
+}
\ No newline at end of file