apimposter/mocks/test/products.yaml
2025-03-25 13:26:36 +01:00

29 lines
677 B
YAML

- method: "GET"
path: "/"
conditionalResponses:
- conditions:
query:
category: "books"
response:
status: 200
headers: { Content-Type: "application/json" }
body:
products:
- id: "b1"
name: "Data Structures and Algorithms in Java"
- conditions:
query:
category: "tech"
response:
status: 200
headers: { Content-Type: "application/json" }
body:
products:
- id: "t1"
name: "Mechanical Keyboard"
response:
status: 200
headers: { Content-Type: "application/json" }
body:
products: []