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
27 lines (27 loc) · 861 Bytes
/
apis.yaml
File metadata and controls
27 lines (27 loc) · 861 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
# yaml-language-server: $schema=https://www.membrane-api.io/v7.1.2.json
api:
port: 2000
flow:
- request:
- call:
url: https://api.predic8.de/shop/v2/products/14
# Extracts name and price from the JSON response and add 1 to the price
- setProperty:
name: name
value: ${$.name}
language: jsonpath
- setProperty:
name: price
value: ${jsonPath('$.price')+1}
# Creates a new JSON body with the name and modified price
- template:
contentType: application/json
src: |
{
"name": ${property.name + ' Big Pack'},
"price": ${property.price}
}
- call:
method: POST
url: https://api.predic8.de/shop/v2/products
- return: {}