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               "href": "http://localhost:8080/1234",
22               "method": "DELETE",
23               "name": "delete"
24             }
25           ],
26           "entities": [
27
28           ]
29         },
30         "generators": {
31           "body": {
32             "$[0].href": {
33               "example": "http://localhost:8080/1234",
34               "regex": ".*\\/(\\Q1234\\E)$",
35               "type": "MockServerURL"
36             },
37             "$[1].href": {
38               "example": "http://localhost:8080/1234",
39               "regex": ".*\\/(\\Q1234\\E)$",
40               "type": "MockServerURL"
41             }
42           }
43         },
44         "headers": {
45           "Content-Type": "application/vnd.siren+json"
46         },
47         "matchingRules": {
48           "body": {
49             "$.actions": {
50               "combine": "AND",
51               "matchers": [
52                 {
53                   "match": "arrayContains",
54                   "variants": [
55                     {
56                       "generators": {
57                         "$.href": {
58                           "example": "http://localhost:8080/1234",
59                           "regex": ".*\\/(\\Q1234\\E)$",
60                           "type": "MockServerURL"
61                         }
62                       },
63                       "index": 0,
64                       "rules": {
65                         "$.href": {
66                           "combine": "AND",
67                           "matchers": [
68                             {
69                               "match": "regex",
70                               "regex": ".*\\/(\\Q1234\\E)$"
71                             }
72                           ]
73                         },
74                         "$.method": {
75                           "combine": "AND",
76                           "matchers": [
77                             {
78                               "match": "type"
79                             }
80                           ]
81                         },
82                         "$.name": {
83                           "combine": "AND",
84                           "matchers": [
85                             {
86                               "match": "type"
87                             }
88                           ]
89                         }
90                       }
91                     },
92                     {
93                       "generators": {
94                         "$.href": {
95                           "example": "http://localhost:8080/1234",
96                           "regex": ".*\\/(\\Q1234\\E)$",
97                           "type": "MockServerURL"
98                         }
99                       },
100                       "index": 1,
101                       "rules": {
102                         "$.href": {
103                           "combine": "AND",
104                           "matchers": [
105                             {
106                               "match": "regex",
107                               "regex": ".*\\/(\\Q1234\\E)$"
108                             }
109                           ]
110                         },
111                         "$.method": {
112                           "combine": "AND",
113                           "matchers": [
114                             {
115                               "match": "type"
116                             }
117                           ]
118                         },
119                         "$.name": {
120                           "combine": "AND",
121                           "matchers": [
122                             {
123                               "match": "type"
124                             }
125                           ]
126                         }
127                       }
128                     }
129                   ]
130                 }
131               ]
132             }
133           }
134         },
135         "status": 200
136       }
137     }
138   ],
139   "metadata": {
140     "pact-jvm": {
141       "version": "4.2.2"
142     },
143     "pactSpecification": {
144       "version": "3.0.0"
145     }
146   },
147   "provider": {
148     "name": "Siren Order Provider"
149   }
150 }