953d4e6792a35f7aafebd12078deef261f464f55
[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           "age": 100,
15           "happy": true,
16           "hexCode": "1234a",
17           "id": 1234567890,
18           "localAddress": "127.0.0.1",
19           "name": "string"
20         },
21         "generators": {
22           "body": {
23             "$.hexCode": {
24               "digits": 10,
25               "type": "RandomHexadecimal"
26             },
27             "$.id": {
28               "max": 2147483647,
29               "min": 0,
30               "type": "RandomInt"
31             },
32             "$.name": {
33               "size": 20,
34               "type": "RandomString"
35             }
36           }
37         },
38         "headers": {
39           "Content-Type": "application/vnd.siren+json"
40         },
41         "matchingRules": {
42           "body": {
43             "$.happy": {
44               "combine": "AND",
45               "matchers": [
46                 {
47                   "match": "type"
48                 }
49               ]
50             },
51             "$.hexCode": {
52               "combine": "AND",
53               "matchers": [
54                 {
55                   "match": "regex",
56                   "regex": "[0-9a-fA-F]+"
57                 }
58               ]
59             },
60             "$.id": {
61               "combine": "AND",
62               "matchers": [
63                 {
64                   "match": "type"
65                 }
66               ]
67             },
68             "$.localAddress": {
69               "combine": "AND",
70               "matchers": [
71                 {
72                   "match": "regex",
73                   "regex": "(\\d{1,3}\\.)+\\d{1,3}"
74                 }
75               ]
76             },
77             "$.name": {
78               "combine": "AND",
79               "matchers": [
80                 {
81                   "match": "type"
82                 }
83               ]
84             }
85           }
86         },
87         "status": 200
88       }
89     },
90     {
91       "description": "get root",
92       "request": {
93         "method": "GET",
94         "path": "/"
95       },
96       "response": {
97         "headers": {
98           "Content-Type": "application/vnd.siren+json"
99         },
100         "status": 200
101       }
102     }
103   ],
104   "metadata": {
105     "pact-jvm": {
106       "version": "4.2.2"
107     },
108     "pactSpecification": {
109       "version": "3.0.0"
110     }
111   },
112   "provider": {
113     "name": "Siren Order Provider"
114   }
115 }