-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathgenerate-mock-data.json
181 lines (181 loc) · 6.96 KB
/
generate-mock-data.json
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
{
"uuid": "",
"lastMigration": 29,
"name": "Tutorial - Generate mock data",
"endpointPrefix": "",
"latency": 0,
"port": 3001,
"routes": [
{
"uuid": "",
"documentation": "Get a list of posts (JSON)",
"method": "get",
"endpoint": "posts",
"responses": [
{
"uuid": "",
"body": "[\r\n {{#repeat (queryParam 'total' '3')}}\r\n {\r\n \"id\": {{@index}},\r\n \"title\": \"{{faker 'lorem.sentence'}}\",\r\n \"content\": \"{{faker 'lorem.sentences'}}\",\r\n \"media\": \"{{faker 'image.urlLoremFlickr'category=\"nature\"}}\",\r\n \"author\": {\r\n \"name\": \"{{faker 'person.firstName'}} {{faker 'person.lastName'}}\",\r\n \"avatar\": \"{{faker 'image.avatar'}}\"\r\n },\r\n \"comments\": [\r\n {{#repeat (faker 'string.numeric' 1)}}\r\n {\r\n \"id\": \"{{faker 'string.uuid'}}\",\r\n \"content\": \"{{faker 'lorem.sentence'}}\",\r\n \"author\": {\r\n \"name\": \"{{faker 'person.firstName'}} {{faker 'person.firstName'}}\",\r\n \"avatar\": \"{{faker 'image.avatar'}}\"\r\n }\r\n }\r\n {{/repeat}}\r\n ],\r\n \"likes\": {{faker 'string.numeric' 100}},\r\n \"shares\": {{faker 'string.numeric' 100}},\r\n \"location\": {\r\n \"lat\": {{faker 'location.latitude'}},\r\n \"long\": {{faker 'location.longitude'}}\r\n },\r\n \"archived\": {{faker 'datatype.boolean'}}\r\n }\r\n {{/repeat}}\r\n]",
"latency": 0,
"statusCode": 200,
"label": "Success",
"headers": [{ "key": "", "value": "" }],
"filePath": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true,
"databucketID": "",
"bodyType": "INLINE",
"crudKey": "id"
}
],
"enabled": true,
"responseMode": null,
"type": "http"
},
{
"uuid": "",
"documentation": "Get a list of location (CSV)",
"method": "get",
"endpoint": "geoData",
"responses": [
{
"uuid": "",
"body": "city,state,address,latitude,longitude,timezone\r\n{{#repeat 5000}}\r\n{{faker 'location.city'}},{{faker 'location.stateAbbr'}},{{faker 'location.streetAddress'}},{{faker 'location.latitude'}},{{faker 'location.longitude'}},{{faker 'location.timeZone'}}\r\n{{/repeat}}",
"latency": 0,
"statusCode": 200,
"label": "Success",
"headers": [{ "key": "Content-Type", "value": "text/csv" }],
"filePath": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true,
"databucketID": "",
"bodyType": "INLINE",
"crudKey": "id"
}
],
"enabled": true,
"responseMode": null,
"type": "http"
},
{
"uuid": "",
"documentation": "Get a list of products (XML)",
"method": "get",
"endpoint": "products",
"responses": [
{
"uuid": "",
"body": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<PRODUCTS>\r\n {{# repeat 50}}\r\n <PRODUCT>\r\n <UUID>{{faker 'string.uuid'}}</UUID>\r\n <NAME>{{faker 'commerce.product'}}</NAME>\r\n <PRICE>{{faker 'commerce.price'}}</PRICE>\r\n <COLOR>{{faker 'color.human'}}</COLOR>\r\n <INVENTORY>{{faker 'string.numeric' 50}}</INVENTORY>\r\n </PRODUCT>\r\n {{/ repeat}}\r\n</PRODUCTS>",
"latency": 0,
"statusCode": 200,
"label": "",
"headers": [{ "key": "Content-Type", "value": "application/xml" }],
"filePath": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true,
"databucketID": "",
"bodyType": "INLINE",
"crudKey": "id"
}
],
"enabled": true,
"responseMode": null,
"type": "http"
},
{
"uuid": "",
"documentation": "Create a user",
"method": "post",
"endpoint": "users",
"responses": [
{
"uuid": "",
"body": "{\r\n \"id\": \"{{faker 'string.uuid'}}\",\r\n \"firstname\": \"{{body 'firstname'}}\",\r\n \"lastname\": \"{{body 'lastname'}}\",\r\n \"birthdate\": \"{{body 'birthdate'}}\",\r\n \"email\": \"{{body 'email'}}\",\r\n \"createdAt\": \"{{now}}\"\r\n}",
"latency": 0,
"statusCode": 201,
"label": "Created",
"headers": [{ "key": "", "value": "" }],
"filePath": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true,
"databucketID": "",
"bodyType": "INLINE",
"crudKey": "id"
}
],
"enabled": true,
"responseMode": null,
"type": "http"
},
{
"uuid": "",
"documentation": "Get a list of products or materials",
"method": "get",
"endpoint": "inventory/:type",
"responses": [
{
"uuid": "",
"body": "[\r\n {{#repeat (queryParam 'total' '5')}}\r\n {\r\n \"id\": \"{{faker 'string.uuid'}}\",\r\n {{# switch (urlParam 'type')}}\r\n {{# case 'products'}}\r\n \"name\": \"{{faker 'commerce.product'}}\",\r\n \"price\": \"{{faker 'commerce.price'}} EUR\"\r\n {{/ case}}\r\n {{# case 'materials'}}\r\n \"name\": \"{{faker 'commerce.productMaterial'}}\",\r\n \"quantity\": \"{{faker 'string.numeric' 50}}\"\r\n {{/ case}}\r\n {{/ switch}}\r\n }\r\n {{/repeat}}\r\n]",
"latency": 0,
"statusCode": 200,
"label": "Success",
"headers": [{ "key": "", "value": "" }],
"filePath": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true,
"databucketID": "",
"bodyType": "INLINE",
"crudKey": "id"
}
],
"enabled": true,
"responseMode": null,
"type": "http"
}
],
"proxyMode": false,
"proxyHost": "",
"cors": true,
"headers": [{ "key": "Content-Type", "value": "application/json" }],
"proxyReqHeaders": [{ "key": "", "value": "" }],
"proxyResHeaders": [{ "key": "", "value": "" }],
"proxyRemovePrefix": false,
"hostname": "",
"tlsOptions": {
"enabled": false,
"type": "CERT",
"pfxPath": "",
"certPath": "",
"keyPath": "",
"caPath": "",
"passphrase": ""
},
"data": [],
"folders": [],
"rootChildren": [
{ "type": "route", "uuid": "" },
{ "type": "route", "uuid": "" },
{ "type": "route", "uuid": "" },
{ "type": "route", "uuid": "" },
{ "type": "route", "uuid": "" }
]
}