-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmock.config.yaml
More file actions
57 lines (57 loc) · 1.14 KB
/
mock.config.yaml
File metadata and controls
57 lines (57 loc) · 1.14 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
version: 1
server:
basePath: ""
logRetention: 200
redactHeaders:
- authorization
- cookie
- set-cookie
- x-api-key
maxBodyBytes: 65536
routes:
- id: get-user
description: Fetch user by id
priority: 10
method: GET
path: /users/:id
match:
query:
includePosts:
oneOf:
- "true"
- "false"
headers:
x-env:
equals: dev
responses:
- name: ok
weight: 100
status: 200
delayMs:
min: 50
max: 500
headers:
content-type: application/json
body:
id: "{{params.id}}"
includePosts: "{{query.includePosts}}"
name: "User {{params.id}}"
responseSchema:
type: object
required:
- id
- includePosts
- name
properties:
id:
type: string
includePosts:
type: string
name:
type: string
errors:
- name: random-500
probability: 0.1
status: 500
body:
error: random failure