Pattern matching
rules:
- when: params.order == 'desc'
#first entry must contains info about request unit
request:
path: /hello
response:
headers:
content-type: application/json
body: [3, 2, 1]
- when: params.order == 'asc'
response:
headers:
content-type: application/json
body: [1, 2, 3]
#presence check
- when: params.containsKey('order')
response:
headers:
content-type: application/json
body: [4]
#default response should be at the end of the list
- response:
headers:
content-type: application/json
body: [0]Last updated