api:
port: 2000
flow:
- choose:
- case:
test: headers['X-Foo'] != null
flow:
- return:
status: 200
- case:
test: headers['X-Bar'] != null
flow:
- return:
status: 300
- otherwise:
- return:
status: 400
api:
port: 2000
flow:
- choose:
- case:
test: headers['X-Foo'] != null
flow:
- return:
status: 200
- case:
test: headers['X-Bar'] != null
flow:
- return:
status: 300
- otherwise:
- return:
status: 400
Syntax
choose:
- <choices>choose: - <choices>
Child Structure
| Element | Cardinality | Description |
|---|---|---|
| choices | 0..* | Sets the list of choices. The choices can include "case" and "otherwise" elements to define conditional flows. |