forked from vtrifonov/http-api-mock
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathamqp.json
33 lines (33 loc) · 974 Bytes
/
amqp.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
{
"description": "Sends a message to an AMQP server after the content is persisted",
"request":{
"method":"POST",
"path":"/amqp/*.json"
},
"persist": {
"entity": "/user-{{request.url./amqp/(?P<value>\\d+)}}.json",
"actions" : {
"write" : "{{request.body}}",
"append" : "{ \"id\": {{request.url./amqp/(?P<value>\\d+)}}, \"city\": \"{{ fake.City }}\" }"
}
},
"response":{
"statusCode":202,
"headers":{
"Content-Type":[
"application/json"
]
},
"body":"{{persist.entity.content}}"
},
"notify":{
"amqp":{
"url":"amqp://guest:guest@localhost:5672/myVHost",
"body":"{{persist.entity.content}}",
"delay":2,
"exchange":"myExchange",
"type":"MockType",
"correlationId":"9782b88f-0c6e-4879-8c23-4699785e6a95"
}
}
}