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
38 lines (35 loc) · 801 Bytes
/
apis.yaml
File metadata and controls
38 lines (35 loc) · 801 Bytes
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
# yaml-language-server: $schema=https://www.membrane-api.io/v7.1.2.json
components:
log:
chain:
- request:
- log:
message: "Path: ${path}"
cors:
chain:
- response:
- setHeader:
name: Access-Control-Allow-Origin
value: "*"
- setHeader:
name: Access-Control-Allow-Methods
value: POST, PUT
---
api:
port: 2000
path:
uri: /foo
flow:
- $ref: '#/components/log'
- return:
status: 200
---
api:
port: 2000
path:
uri: /bar
flow:
- $ref: '#/components/log' # Chains can be applied to more than one API
- $ref: '#/components/cors' # Referencing long chains can keep API definitions small and comprehensible
- return:
status: 200