Skip to content

Commit fffa508

Browse files
committed
Update readme and add webhook tutorial file
1 parent 45b417e commit fffa508

File tree

3 files changed

+207
-13
lines changed

3 files changed

+207
-13
lines changed

.vscode/settings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"typescript.tsdk": "node_modules\\typescript\\lib",
33
"editor.defaultFormatter": "esbenp.prettier-vscode",
4-
"editor.codeActionsOnSave": { "source.organizeImports": true },
4+
"editor.codeActionsOnSave": {
5+
"source.organizeImports": "explicit"
6+
},
57
"editor.formatOnSave": true
68
}

README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<div align="center">
22
<a href="https://mockoon.com" alt="mockoon logo">
3-
<img width="200" height="200" src="https://mockoon.com/images/logo-square-mock-api-samples.png">
3+
<img width="200" height="200" src="https://mockoon.com/images/logo-square-website.png">
44
</a>
55
<br>
6-
<a href="https://mockoon.com/#download"><img src="https://img.shields.io/badge/Download%20app-Go-green.svg?style=flat-square&colorB=1997c6"/></a>
6+
<a href="https://mockoon.com/download/"><img src="https://img.shields.io/badge/Download%20app-Go-green.svg?style=flat-square&colorB=1997c6"/></a>
77
<a href="https://mockoon.com/"><img src="https://img.shields.io/badge/Website-Go-green.svg?style=flat-square&colorB=1997c6"/></a>
8-
<a href="http://eepurl.com/dskB2X"><img src="https://img.shields.io/badge/Newsletter-Subscribe-green.svg?style=flat-square"/></a>
8+
<a href="https://mockoon.com/newsletter/"><img src="https://img.shields.io/badge/Newsletter-Subscribe-green.svg?style=flat-square"/></a>
99
<a href="https://twitter.com/GetMockoon"><img src="https://img.shields.io/badge/[email protected]?style=flat-square&colorB=1da1f2"/></a>
10-
<a href="https://discord.gg/MutRpsY5gE"><img src="https://img.shields.io/badge/Discord-go-blue.svg?style=flat-square&colorA=6c84d9&colorB=1da1f2"/></a>
10+
<a href="https://discord.gg/FtJjkejKGp"><img src="https://img.shields.io/badge/Discord-go-blue.svg?style=flat-square&colorA=6c84d9&colorB=1da1f2"/></a>
1111
<br>
1212
<br>
13-
<h1>Mockoon's mock samples</h1>
13+
<h1>Mockoon's moc samples</h1>
1414
</div>
1515

1616
Welcome to Mockoon's mock API samples repository. You will find in the [`apis`](/mock-apis) folder many mock samples from popular APIs (Open Weather, Giphy, etc.). We will be adding more samples from time to time.
@@ -37,26 +37,26 @@ In both cases, a new environment will be created and ready to use after running
3737

3838
## How to use the samples with Mockoon CLI
3939

40-
To run the mock samples with the [CLI](https://github.com/mockoon/cli) you can diractly run the following command using the sample raw file GitHub URL:
40+
To run the mock samples with the [CLI](https://github.com/mockoon/cli) you can diractly run the following command using the sample raw file GitHub URL:
4141

4242
`mockoon-cli start --data https://raw.githubusercontent.com/mockoon/mock-samples/main/mock-apis/data/giphycom.json`
4343

4444
## Support/feedback
4545

46-
You can discuss all things related to Mockoon, and ask for help, on the [official community](https://github.com/mockoon/mockoon/discussions). It's also a good place to discuss bugs and feature requests before opening an issue on this repository. For more chat-like discussions, you can also join our [Discord server](https://discord.gg/MutRpsY5gE).
46+
You can discuss all things related to Mockoon, and ask for help, on the [official community](https://github.com/mockoon/mockoon/discussions). It's also a good place to discuss bugs and feature requests before opening an issue on this repository. For more chat-like discussions, you can also join our [Discord server](https://discord.gg/FtJjkejKGp).
4747

4848
## Contributing
4949

50-
If you are interested in contributing to Mockoon mock samples, please take a look at the [contributing guidelines](https://github.com/mockoon/mock-samples/blob/main/CONTRIBUTING.md).
50+
If you are interested in contributing to Mockoon website and documentation, please take a look at the [contributing guidelines](https://github.com/mockoon/mockoon.com/blob/main/CONTRIBUTING.md).
5151

52-
Please also take a look at our [Code of Conduct](https://github.com/mockoon/mock-samples/blob/main/CODE_OF_CONDUCT.md).
52+
Please also take a look at our [Code of Conduct](https://github.com/mockoon/mockoon.com/blob/main/CODE_OF_CONDUCT.md).
5353

5454
## Documentation
5555

56-
You will find Mockoon's [documentation](https://mockoon.com/docs/latest) on the official website. It covers Mockoon's most complex features. Feel free to contribute or ask for new topics to be covered.
56+
You will find Mockoon's [documentation](https://mockoon.com/docs/latest/) on the official website. It covers Mockoon's most complex features. Feel free to contribute or ask for new topics to be covered.
5757

5858
## Roadmap
5959

60-
If you want to know what will be coming in the next release you can check the [project "Roadmap"](https://github.com/orgs/mockoon/projects/9).
60+
If you want to know what will be coming in the next release you can check the global [Roadmap](https://github.com/orgs/mockoon/projects/9).
6161

62-
New releases will be announced on Mockoon's [Twitter account @GetMockoon](https://twitter.com/GetMockoon) and through the newsletter to which you can subscribe [here](http://eepurl.com/dskB2X).
62+
New releases will be announced on Mockoon's [Twitter account @GetMockoon](https://twitter.com/GetMockoon) and through the newsletter to which you can subscribe [here](https://mockoon.com/newsletter/).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
{
2+
"uuid": "1fe22148-65b8-4c7d-ba28-1e567696cef0",
3+
"lastMigration": 33,
4+
"name": "Simulate Webhook Tutorial",
5+
"endpointPrefix": "",
6+
"latency": 0,
7+
"port": 3000,
8+
"hostname": "",
9+
"folders": [],
10+
"routes": [
11+
{
12+
"uuid": "b6e676ae-4bde-4988-aac7-664afdccf740",
13+
"type": "http",
14+
"documentation": "Create an order",
15+
"method": "post",
16+
"endpoint": "orders",
17+
"responses": [
18+
{
19+
"uuid": "c2116747-38d2-449e-913b-a8787211edb8",
20+
"body": "{{setData 'push' 'orders' null (object orderId='123456' status='pending')}}\r\n\r\n{\r\n \"orderId\": \"123456\",\r\n \"status\": \"pending\"\r\n}",
21+
"latency": 0,
22+
"statusCode": 200,
23+
"label": "",
24+
"headers": [],
25+
"bodyType": "INLINE",
26+
"filePath": "",
27+
"databucketID": "",
28+
"sendFileAsBody": false,
29+
"rules": [],
30+
"rulesOperator": "OR",
31+
"disableTemplating": false,
32+
"fallbackTo404": false,
33+
"default": true,
34+
"crudKey": "id",
35+
"callbacks": [
36+
{
37+
"uuid": "d9efda74-16ed-462e-843c-f1d718356640",
38+
"latency": 10000
39+
}
40+
]
41+
}
42+
],
43+
"responseMode": null,
44+
"streamingMode": null,
45+
"streamingInterval": 0
46+
},
47+
{
48+
"uuid": "f472515e-d63a-47a5-9367-0764675921a2",
49+
"type": "http",
50+
"documentation": "Get all orders",
51+
"method": "get",
52+
"endpoint": "orders",
53+
"responses": [
54+
{
55+
"uuid": "21a31486-9037-4563-8f33-cddccd2d2cb0",
56+
"body": "{{data 'orders'}}",
57+
"latency": 0,
58+
"statusCode": 200,
59+
"label": "",
60+
"headers": [],
61+
"bodyType": "INLINE",
62+
"filePath": "",
63+
"databucketID": "",
64+
"sendFileAsBody": false,
65+
"rules": [],
66+
"rulesOperator": "OR",
67+
"disableTemplating": false,
68+
"fallbackTo404": false,
69+
"default": true,
70+
"crudKey": "id",
71+
"callbacks": []
72+
}
73+
],
74+
"responseMode": null,
75+
"streamingMode": null,
76+
"streamingInterval": 0
77+
},
78+
{
79+
"uuid": "83edb0fb-4af3-4557-9a10-e779011ae448",
80+
"type": "http",
81+
"documentation": "Update orders",
82+
"method": "post",
83+
"endpoint": "webhook",
84+
"responses": [
85+
{
86+
"uuid": "ee0d6359-c656-4585-9d95-7c166c868ac6",
87+
"body": "{{setData 'set' 'orders' '0.status' 'paid'}}",
88+
"latency": 0,
89+
"statusCode": 200,
90+
"label": "",
91+
"headers": [],
92+
"bodyType": "INLINE",
93+
"filePath": "",
94+
"databucketID": "",
95+
"sendFileAsBody": false,
96+
"rules": [],
97+
"rulesOperator": "OR",
98+
"disableTemplating": false,
99+
"fallbackTo404": false,
100+
"default": true,
101+
"crudKey": "id",
102+
"callbacks": []
103+
}
104+
],
105+
"responseMode": null,
106+
"streamingMode": null,
107+
"streamingInterval": 0
108+
}
109+
],
110+
"rootChildren": [
111+
{
112+
"type": "route",
113+
"uuid": "b6e676ae-4bde-4988-aac7-664afdccf740"
114+
},
115+
{
116+
"type": "route",
117+
"uuid": "f472515e-d63a-47a5-9367-0764675921a2"
118+
},
119+
{
120+
"type": "route",
121+
"uuid": "83edb0fb-4af3-4557-9a10-e779011ae448"
122+
}
123+
],
124+
"proxyMode": false,
125+
"proxyHost": "",
126+
"proxyRemovePrefix": false,
127+
"tlsOptions": {
128+
"enabled": false,
129+
"type": "CERT",
130+
"pfxPath": "",
131+
"certPath": "",
132+
"keyPath": "",
133+
"caPath": "",
134+
"passphrase": ""
135+
},
136+
"cors": true,
137+
"headers": [
138+
{
139+
"key": "Content-Type",
140+
"value": "application/json"
141+
},
142+
{
143+
"key": "Access-Control-Allow-Origin",
144+
"value": "*"
145+
},
146+
{
147+
"key": "Access-Control-Allow-Methods",
148+
"value": "GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS"
149+
},
150+
{
151+
"key": "Access-Control-Allow-Headers",
152+
"value": "Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With"
153+
}
154+
],
155+
"proxyReqHeaders": [
156+
{
157+
"key": "",
158+
"value": ""
159+
}
160+
],
161+
"proxyResHeaders": [
162+
{
163+
"key": "",
164+
"value": ""
165+
}
166+
],
167+
"data": [
168+
{
169+
"uuid": "05966275-3dab-4d54-9499-5885e97b1c7a",
170+
"id": "ah7p",
171+
"name": "orders",
172+
"documentation": "",
173+
"value": "[\n]"
174+
}
175+
],
176+
"callbacks": [
177+
{
178+
"uuid": "d9efda74-16ed-462e-843c-f1d718356640",
179+
"id": "940q",
180+
"uri": "http://localhost:3006/webhook",
181+
"name": "Payment processing",
182+
"documentation": "",
183+
"method": "post",
184+
"headers": [],
185+
"bodyType": "INLINE",
186+
"body": "",
187+
"databucketID": "",
188+
"filePath": "",
189+
"sendFileAsBody": true
190+
}
191+
]
192+
}

0 commit comments

Comments
 (0)