-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtest.http
66 lines (57 loc) · 1.59 KB
/
test.http
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
### Send POST Command - Create Restaurant
POST http://localhost:8080/commands
Content-Type: application/json
{
"type": "com.fraktalio.domain.CreateRestaurantCommand",
"identifier": "10fca0c4-3376-4ca2-a7c2-db2b75c250a1",
"name": "Big Snack",
"menu": {
"menuId": "10fca0c4-3376-4ca2-a7c2-db2b75c250a2",
"cuisine": "SERBIAN",
"menuItems": [
{
"menuItemId": "10fca0c4-3376-4ca2-a7c2-db2b75c250a3",
"name": "Cevapi",
"price": 300
},
{
"menuItemId": "10fca0c4-3376-4ca2-a7c2-db2b75c250a4",
"name": "Pljeskavica",
"price": 400
}
]
}
}
### Send POST Command - Place the Order
POST http://localhost:8080/commands
Content-Type: application/json
{
"type": "com.fraktalio.domain.PlaceOrderCommand",
"identifier": "10fca0c4-3376-4ca2-a7c2-db2b75c250a1",
"orderIdentifier": "10fca0c4-3376-4ca2-a7c2-db2b75c250a5",
"lineItems": [
{
"id": "10fca0c4-3376-4ca2-a7c2-db2b75c250a6",
"menuItemId": "10fca0c4-3376-4ca2-a7c2-db2b75c250a3",
"name": "Cevapi",
"quantity": 10
},
{
"id": "10fca0c4-3376-4ca2-a7c2-db2b75c250a7",
"menuItemId": "10fca0c4-3376-4ca2-a7c2-db2b75c250a4",
"name": "Pljeskavica",
"quantity": 1
}
]
}
### Send POST Command - Mark order as Prepared
POST http://localhost:8080/commands
Content-Type: application/json
{
"type": "com.fraktalio.domain.MarkOrderAsPreparedCommand",
"identifier": "10fca0c4-3376-4ca2-a7c2-db2b75c250a5"
}
### GET all restaurants
GET http://localhost:8080/restaurants
### GET all orders
GET http://localhost:8080/orders