Added a Spring-based consumer
[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   "metadata": {
92     "pact-jvm": {
93       "version": "4.2.2"
94     },
95     "pactSpecification": {
96       "version": "3.0.0"
97     }
98   },
99   "provider": {
100     "name": "Siren Order Provider"
101   }
102 }