WIP
[demos/example-siren] / spring-consumer / target / pacts / SpringConsumer-Siren Order Provider.json
index a325ecb..ae1e66d 100644 (file)
         "body": {
           "actions": [
             {
-              "href": "http://localhost:8080/RegexpMatcher(regex=\\d+, value=1234)",
+              "href": "http://localhost:8080/1234",
               "method": "PUT",
               "name": "update"
+            },
+            {
+              "href": "http://localhost:8080/1234",
+              "method": "DELETE",
+              "name": "delete"
+            }
+          ],
+          "class": [
+            "entity"
+          ],
+          "entities": [
+
+          ],
+          "links": [
+            {
+              "href": "http://localhost:8080/orders",
+              "rel": [
+                "self"
+              ]
             }
           ]
         },
         "generators": {
           "body": {
+            "$.links[0].href": {
+              "example": "http://localhost:8080/orders",
+              "regex": ".*\\/(\\Qorders\\E)$",
+              "type": "MockServerURL"
+            },
             "$[0].href": {
-              "example": "http://localhost:8080/RegexpMatcher(regex=\\d+, value=1234)",
-              "regex": ".*\\/(\\QRegexpMatcher(regex=\\d+, value=1234)\\E)$",
+              "example": "http://localhost:8080/1234",
+              "regex": ".*\\/(\\Q1234\\E)$",
+              "type": "MockServerURL"
+            },
+            "$[1].href": {
+              "example": "http://localhost:8080/1234",
+              "regex": ".*\\/(\\Q1234\\E)$",
               "type": "MockServerURL"
             }
           }
@@ -42,8 +71,8 @@
                     {
                       "generators": {
                         "$.href": {
-                          "example": "http://localhost:8080/RegexpMatcher(regex=\\d+, value=1234)",
-                          "regex": ".*\\/(\\QRegexpMatcher(regex=\\d+, value=1234)\\E)$",
+                          "example": "http://localhost:8080/1234",
+                          "regex": ".*\\/(\\Q1234\\E)$",
                           "type": "MockServerURL"
                         }
                       },
                           "matchers": [
                             {
                               "match": "regex",
-                              "regex": ".*\\/(\\QRegexpMatcher(regex=\\d+, value=1234)\\E)$"
+                              "regex": ".*\\/(\\Q1234\\E)$"
+                            }
+                          ]
+                        },
+                        "$.method": {
+                          "combine": "AND",
+                          "matchers": [
+                            {
+                              "match": "type"
+                            }
+                          ]
+                        },
+                        "$.name": {
+                          "combine": "AND",
+                          "matchers": [
+                            {
+                              "match": "type"
+                            }
+                          ]
+                        }
+                      }
+                    },
+                    {
+                      "generators": {
+                        "$.href": {
+                          "example": "http://localhost:8080/1234",
+                          "regex": ".*\\/(\\Q1234\\E)$",
+                          "type": "MockServerURL"
+                        }
+                      },
+                      "index": 1,
+                      "rules": {
+                        "$.href": {
+                          "combine": "AND",
+                          "matchers": [
+                            {
+                              "match": "regex",
+                              "regex": ".*\\/(\\Q1234\\E)$"
                             }
                           ]
                         },
                   ]
                 }
               ]
+            },
+            "$.links[0].href": {
+              "combine": "AND",
+              "matchers": [
+                {
+                  "match": "regex",
+                  "regex": ".*\\/(\\Qorders\\E)$"
+                }
+              ]
             }
           }
         },
         "status": 200
       }
-    },
-    {
-      "description": "get root",
-      "request": {
-        "method": "GET",
-        "path": "/"
-      },
-      "response": {
-        "headers": {
-          "Content-Type": "application/vnd.siren+json"
-        },
-        "status": 200
-      }
     }
   ],
   "metadata": {