forked from membrane/api-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapis.yaml
More file actions
52 lines (49 loc) · 1.09 KB
/
apis.yaml
File metadata and controls
52 lines (49 loc) · 1.09 KB
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
# yaml-language-server: $schema=https://www.membrane-api.io/v7.1.2.json
api:
port: 2000
flow:
- request:
# Attention: The last matching `if` will win!
- if:
test: //order
language: xpath
flow:
- destination:
url: internal://order
- if:
test: //order[@express='yes']
language: xpath
flow:
- destination:
url: internal://express
- if:
test: //order/items/item[@id='7']
language: xpath
flow:
- destination:
url: internal://import-items
---
api:
# The name is needed to reference the API as internal://import-items
name: import-items
port: 3000
flow:
- static:
src: Order contains import items.
- return:
status: 200
---
internal:
name: order
flow:
- static:
src: Normal order received.
- return:
status: 200
---
internal:
name: express
flow:
- static:
src: Express order received.
- return: {}