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
45 lines (41 loc) · 1.07 KB
/
apis.yaml
File metadata and controls
45 lines (41 loc) · 1.07 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
# yaml-language-server: $schema=https://www.membrane-api.io/v7.1.2.json
# Simple text template with a variable
api:
port: 2000
path:
uri: /text
flow:
- request:
- template:
contentType: text/plain
src: Hello ${params.name?[0]}!
- return:
status: 200
---
# Shows variable usage
api:
port: 2000
path:
uri: /variables
flow:
- request:
- template:
contentType: text/plain
src: |
Header:
<% for(h in header.allHeaderFields) { %>
<%= h.headerName %> : <%= h.value %>
<% } %>
Exchange: <%= exc %>
Flow: <%= flow %>
Message.version: <%= message.version %>
Body: <%= message.body %>
Exchange Properties:
<% for(p in props) { %>
Key: <%= p.key %> : <%= p.value %>
<% } %>
Query Params:
<% for(p in params) { %>
<%= p.key %> : <%= p.value %>
<% } %>
- return: {}