|
1 | 1 | { |
2 | | - "$schema": "http://json-schema.org/draft-07/schema#", |
3 | | - "title": "Mock Server Schema", |
4 | | - "type": "object", |
5 | | - "properties": { |
6 | | - "objects": { |
7 | | - "type": "array", |
8 | | - "items": { |
9 | | - "type": "object", |
10 | | - "properties": { |
11 | | - "name": {"type": "string"}, |
12 | | - "initCount": {"type": "integer"}, |
13 | | - "sample": {"type": "string"} |
14 | | - }, |
15 | | - "required": ["name"] |
16 | | - } |
17 | | - }, |
18 | | - "items": { |
19 | | - "type": "array", |
20 | | - "items": { |
21 | | - "type": "object", |
22 | | - "properties": { |
23 | | - "name": {"type": "string"}, |
24 | | - "request": { |
25 | | - "type": "object", |
26 | | - "properties": { |
27 | | - "path": {"type": "string"}, |
28 | | - "method": {"type": "string"}, |
29 | | - "header": { |
30 | | - "type": "object", |
31 | | - "additionalProperties": {"type": "string"} |
32 | | - }, |
33 | | - "body": {"type": "string"} |
34 | | - }, |
35 | | - "required": ["path"] |
36 | | - }, |
37 | | - "response": { |
38 | | - "type": "object", |
39 | | - "properties": { |
40 | | - "encoder": {"type": "string"}, |
41 | | - "body": {"type": "string"}, |
42 | | - "header": { |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | + "title": "Mock Server Schema", |
| 4 | + "type": "object", |
| 5 | + "properties": { |
| 6 | + "objects": { |
| 7 | + "type": "array", |
| 8 | + "items": { |
43 | 9 | "type": "object", |
44 | | - "additionalProperties": {"type": "string"} |
45 | | - }, |
46 | | - "statusCode": {"type": "integer"}, |
47 | | - "bodyData": {"type": "string", "contentEncoding": "base64"} |
| 10 | + "properties": { |
| 11 | + "name": { |
| 12 | + "type": "string" |
| 13 | + }, |
| 14 | + "initCount": { |
| 15 | + "type": "integer" |
| 16 | + }, |
| 17 | + "sample": { |
| 18 | + "type": "string" |
| 19 | + } |
| 20 | + }, |
| 21 | + "required": [ |
| 22 | + "name" |
| 23 | + ] |
48 | 24 | } |
49 | | - }, |
50 | | - "param": { |
51 | | - "type": "object", |
52 | | - "additionalProperties": {"type": "string"} |
53 | | - } |
54 | 25 | }, |
55 | | - "required": ["name", "request", "response"] |
56 | | - } |
57 | | - }, |
58 | | - "proxies": { |
59 | | - "type": "array", |
60 | | - "items": { |
61 | | - "type": "object", |
62 | | - "properties": { |
63 | | - "path": {"type": "string"}, |
64 | | - "target": {"type": "string"} |
| 26 | + "items": { |
| 27 | + "type": "array", |
| 28 | + "items": { |
| 29 | + "type": "object", |
| 30 | + "properties": { |
| 31 | + "name": { |
| 32 | + "type": "string", |
| 33 | + "minLength": 1 |
| 34 | + }, |
| 35 | + "request": { |
| 36 | + "type": "object", |
| 37 | + "properties": { |
| 38 | + "path": { |
| 39 | + "type": "string", |
| 40 | + "minLength": 1 |
| 41 | + }, |
| 42 | + "method": { |
| 43 | + "type": "string" |
| 44 | + }, |
| 45 | + "header": { |
| 46 | + "type": "object", |
| 47 | + "additionalProperties": { |
| 48 | + "type": "string" |
| 49 | + } |
| 50 | + }, |
| 51 | + "body": { |
| 52 | + "type": "string" |
| 53 | + } |
| 54 | + }, |
| 55 | + "required": [ |
| 56 | + "path" |
| 57 | + ] |
| 58 | + }, |
| 59 | + "response": { |
| 60 | + "type": "object", |
| 61 | + "properties": { |
| 62 | + "encoder": { |
| 63 | + "type": "string" |
| 64 | + }, |
| 65 | + "body": { |
| 66 | + "type": "string" |
| 67 | + }, |
| 68 | + "header": { |
| 69 | + "type": "object", |
| 70 | + "description": "HTTP response headers. Common headers include 'Content-Type', 'Cache-Control', 'Set-Cookie', etc.", |
| 71 | + "properties": { |
| 72 | + "Content-Type": { |
| 73 | + "type": "string", |
| 74 | + "description": "The MIME type of the response body" |
| 75 | + }, |
| 76 | + "Cache-Control": { |
| 77 | + "type": "string", |
| 78 | + "description": "Directives for caching mechanisms in both requests and responses" |
| 79 | + }, |
| 80 | + "Set-Cookie": { |
| 81 | + "type": "string", |
| 82 | + "description": "Used to send cookies from the server to the user agent" |
| 83 | + } |
| 84 | + }, |
| 85 | + "additionalProperties": { |
| 86 | + "type": "string" |
| 87 | + } |
| 88 | + }, |
| 89 | + "statusCode": { |
| 90 | + "type": "integer" |
| 91 | + }, |
| 92 | + "bodyData": { |
| 93 | + "type": "string", |
| 94 | + "contentEncoding": "base64" |
| 95 | + } |
| 96 | + } |
| 97 | + }, |
| 98 | + "param": { |
| 99 | + "type": "object", |
| 100 | + "additionalProperties": { |
| 101 | + "type": "string" |
| 102 | + } |
| 103 | + } |
| 104 | + }, |
| 105 | + "required": [ |
| 106 | + "name", |
| 107 | + "request", |
| 108 | + "response" |
| 109 | + ] |
| 110 | + } |
65 | 111 | }, |
66 | | - "required": ["path", "target"] |
67 | | - } |
68 | | - }, |
69 | | - "webhooks": { |
70 | | - "type": "array", |
71 | | - "items": { |
72 | | - "type": "object", |
73 | | - "properties": { |
74 | | - "name": {"type": "string"}, |
75 | | - "timer": {"type": "string"}, |
76 | | - "request": { |
77 | | - "type": "object", |
78 | | - "properties": { |
79 | | - "path": {"type": "string"}, |
80 | | - "method": {"type": "string"}, |
81 | | - "header": { |
| 112 | + "proxies": { |
| 113 | + "type": "array", |
| 114 | + "items": { |
82 | 115 | "type": "object", |
83 | | - "additionalProperties": {"type": "string"} |
84 | | - }, |
85 | | - "body": {"type": "string"} |
86 | | - }, |
87 | | - "required": ["path"] |
88 | | - } |
| 116 | + "properties": { |
| 117 | + "path": { |
| 118 | + "type": "string" |
| 119 | + }, |
| 120 | + "target": { |
| 121 | + "type": "string" |
| 122 | + } |
| 123 | + }, |
| 124 | + "required": [ |
| 125 | + "path", |
| 126 | + "target" |
| 127 | + ] |
| 128 | + } |
89 | 129 | }, |
90 | | - "required": ["name", "timer", "request"] |
91 | | - } |
| 130 | + "webhooks": { |
| 131 | + "type": "array", |
| 132 | + "items": { |
| 133 | + "type": "object", |
| 134 | + "properties": { |
| 135 | + "name": { |
| 136 | + "type": "string", |
| 137 | + "minLength": 1 |
| 138 | + }, |
| 139 | + "timer": { |
| 140 | + "type": "string", |
| 141 | + "pattern": "^[0-9].*" |
| 142 | + }, |
| 143 | + "request": { |
| 144 | + "type": "object", |
| 145 | + "properties": { |
| 146 | + "path": { |
| 147 | + "type": "string" |
| 148 | + }, |
| 149 | + "method": { |
| 150 | + "type": "string" |
| 151 | + }, |
| 152 | + "header": { |
| 153 | + "type": "object", |
| 154 | + "description": "HTTP request headers. Common headers include 'Content-Type', 'Authorization', 'Accept', 'User-Agent', etc.", |
| 155 | + "properties": { |
| 156 | + "Content-Type": { |
| 157 | + "type": "string", |
| 158 | + "description": "The MIME type of the request body" |
| 159 | + }, |
| 160 | + "Authorization": { |
| 161 | + "type": "string", |
| 162 | + "description": "Authentication credentials for HTTP authentication" |
| 163 | + }, |
| 164 | + "Accept": { |
| 165 | + "type": "string", |
| 166 | + "description": "Media types that are acceptable for the response" |
| 167 | + }, |
| 168 | + "User-Agent": { |
| 169 | + "type": "string", |
| 170 | + "description": "Information about the user agent originating the request" |
| 171 | + } |
| 172 | + }, |
| 173 | + "additionalProperties": { |
| 174 | + "type": "string" |
| 175 | + } |
| 176 | + }, |
| 177 | + "body": { |
| 178 | + "type": "string" |
| 179 | + } |
| 180 | + }, |
| 181 | + "required": [ |
| 182 | + "path" |
| 183 | + ] |
| 184 | + } |
| 185 | + }, |
| 186 | + "required": [ |
| 187 | + "name", |
| 188 | + "timer", |
| 189 | + "request" |
| 190 | + ] |
| 191 | + } |
| 192 | + } |
92 | 193 | } |
93 | | - } |
94 | 194 | } |
0 commit comments