WIP
[demos/example-siren] / spring-consumer / target / pacts / SpringConsumer-Siren Order Provider.json
1 {
2   "consumer": {
3     "name": "SpringConsumer"
4   },
5   "interactions": [
6     {
7       "description": "get all orders",
8       "request": {
9         "method": "GET",
10         "path": "/orders"
11       },
12       "response": {
13         "body": {
14           "actions": [
15             {
16               "href": "http://localhost:8080/RegexpMatcher(regex=\\d+, value=1234)",
17               "method": "PUT",
18               "name": "update"
19             }
20           ]
21         },
22         "generators": {
23           "body": {
24             "$[0].href": {
25               "example": "http://localhost:8080/RegexpMatcher(regex=\\d+, value=1234)",
26               "regex": ".*\\/(\\QRegexpMatcher(regex=\\d+, value=1234)\\E)$",
27               "type": "MockServerURL"
28             }
29           }
30         },
31         "headers": {
32           "Content-Type": "application/vnd.siren+json"
33         },
34         "matchingRules": {
35           "body": {
36             "$.actions": {
37               "combine": "AND",
38               "matchers": [
39                 {
40                   "match": "arrayContains",
41                   "variants": [
42                     {
43                       "generators": {
44                         "$.href": {
45                           "example": "http://localhost:8080/RegexpMatcher(regex=\\d+, value=1234)",
46                           "regex": ".*\\/(\\QRegexpMatcher(regex=\\d+, value=1234)\\E)$",
47                           "type": "MockServerURL"
48                         }
49                       },
50                       "index": 0,
51                       "rules": {
52                         "$.href": {
53                           "combine": "AND",
54                           "matchers": [
55                             {
56                               "match": "regex",
57                               "regex": ".*\\/(\\QRegexpMatcher(regex=\\d+, value=1234)\\E)$"
58                             }
59                           ]
60                         },
61                         "$.method": {
62                           "combine": "AND",
63                           "matchers": [
64                             {
65                               "match": "type"
66                             }
67                           ]
68                         },
69                         "$.name": {
70                           "combine": "AND",
71                           "matchers": [
72                             {
73                               "match": "type"
74                             }
75                           ]
76                         }
77                       }
78                     }
79                   ]
80                 }
81               ]
82             }
83           }
84         },
85         "status": 200
86       }
87     },
88     {
89       "description": "get root",
90       "request": {
91         "method": "GET",
92         "path": "/"
93       },
94       "response": {
95         "headers": {
96           "Content-Type": "application/vnd.siren+json"
97         },
98         "status": 200
99       }
100     }
101   ],
102   "metadata": {
103     "pact-jvm": {
104       "version": "4.2.2"
105     },
106     "pactSpecification": {
107       "version": "3.0.0"
108     }
109   },
110   "provider": {
111     "name": "Siren Order Provider"
112   }
113 }