-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmockservice-sample.jsonc
60 lines (60 loc) · 1.69 KB
/
mockservice-sample.jsonc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
"id": "e41b0869-e3b0-4db1-a3d0-b1708eb8190f",
"title": "Orders Mock Service",
"version": "1.0.0",
"type": "REST",
"endpoints": {
"path": "/orders",
"method": "GET",
"scenarios": [
{
"id": "5b03c05d-330a-4dca-a5b2-f7a726b57a92",
"type": "HTTP_RESPONSE",
"config": {
"statusCode": 200,
"responseBodyTemplate": "some template",
"responseHeaders": {
"x-some-server": "{{$randomServerName}}"
}
}
}
],
"dynamicScenarios": [
{
"id": "c4a9192b-b01d-401c-bf03-1b1e9725ddea",
"predicate": "body.role=\"admin\" and method = \"POST\"",
"scenarioId": "5b03c05d-330a-4dca-a5b2-f7a726b57a92"
}
],
"responseDelay": 1000
},
"config": {
"cors": {
"allowedOrigins": [
"test.example.com"
],
"allowedMethods": [
"GET",
"POST",
"DELETE",
"PUT"
],
"allowedHeaders": []
},
"defaultResponseHeaders": {
"x-mocked-response": true
},
"upstreams": [
{
"name": "Orders API Dev",
"url": "https://dev.example.com/orders"
},
{
"name": "Orders API Staging",
"url": "https://staging.example.com/orders"
}
]
},
"createdAt": "2022-05-25T20:00:04.522Z",
"updatedAt": "2022-05-25T20:00:04.522Z"
}