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/1234",
17               "method": "PUT",
18               "name": "update"
19             }
20           ],
21           "entities": [
22
23           ]
24         },
25         "generators": {
26           "body": {
27             "$[0].href": {
28               "example": "http://localhost:8080/1234",
29               "regex": ".*\\/(\\Q1234\\E)$",
30               "type": "MockServerURL"
31             }
32           }
33         },
34         "headers": {
35           "Content-Type": "application/vnd.siren+json"
36         },
37         "matchingRules": {
38           "body": {
39             "$.actions": {
40               "combine": "AND",
41               "matchers": [
42                 {
43                   "match": "arrayContains",
44                   "variants": [
45                     {
46                       "generators": {
47                         "$.href": {
48                           "example": "http://localhost:8080/1234",
49                           "regex": ".*\\/(\\Q1234\\E)$",
50                           "type": "MockServerURL"
51                         }
52                       },
53                       "index": 0,
54                       "rules": {
55                         "$.href": {
56                           "combine": "AND",
57                           "matchers": [
58                             {
59                               "match": "regex",
60                               "regex": ".*\\/(\\Q1234\\E)$"
61                             }
62                           ]
63                         },
64                         "$.method": {
65                           "combine": "AND",
66                           "matchers": [
67                             {
68                               "match": "type"
69                             }
70                           ]
71                         },
72                         "$.name": {
73                           "combine": "AND",
74                           "matchers": [
75                             {
76                               "match": "type"
77                             }
78                           ]
79                         }
80                       }
81                     }
82                   ]
83                 }
84               ]
85             }
86           }
87         },
88         "status": 200
89       }
90     }
91   ],
92   "metadata": {
93     "pact-jvm": {
94       "version": "4.2.2"
95     },
96     "pactSpecification": {
97       "version": "3.0.0"
98     }
99   },
100   "provider": {
101     "name": "Siren Order Provider"
102   }
103 }