Skip to content

Commit 4f50578

Browse files
committed
Expand objects and arrays in snippets
Remove tabs and new line feeds from snippets Closes #32
1 parent dfeef5e commit 4f50578

File tree

1 file changed

+38
-20
lines changed

1 file changed

+38
-20
lines changed

src/snippets.json

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
"body": [
55
"{",
66
"\t\"\\$schema\": \"https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v1.0/rc.schema.json\",",
7-
"\t\"plugins\": [$1],",
8-
"\t\"urlsToWatch\": [$2]",
7+
"\t\"plugins\": [",
8+
"\t\t$1",
9+
"\t],",
10+
"\t\"urlsToWatch\": [",
11+
"\t\t$2",
12+
"\t]",
913
"}"
1014
],
1115
"description": "Dev Proxy config file"
@@ -53,32 +57,39 @@
5357
"Request": {
5458
"prefix": "devproxy-request",
5559
"body": [
60+
"{",
5661
"\t\"request\": {",
5762
"\t\t\"url\": \"$1\"",
5863
"\t},",
59-
"\t\"response\": {$2}",
64+
"\t\"response\": {",
65+
"\t\t$2",
66+
"\t}",
6067
"}"
6168
],
6269
"description": "Dev Proxy request"
6370
},
6471
"Response": {
6572
"prefix": "devproxy-response",
6673
"body": [
67-
"\r",
74+
"{",
6875
"\t\"statusCode\": ${1:400},",
69-
"\t\"body\": {$2},",
70-
"\t\"headers\": [$3]\r"
76+
"\t\"body\": {",
77+
"\t\t$2",
78+
"\t},",
79+
"\t\"headers\": [",
80+
"\t\t$3",
81+
"\t]",
82+
"}"
7183
],
7284
"description": "Dev Proxy response"
7385
},
7486
"ResponseHeader": {
7587
"prefix": "devproxy-response-header",
7688
"body": [
77-
"\r",
7889
"{",
7990
"\t\"name\": \"$1\",",
8091
"\t\"value\": \"$2\"",
81-
"}\r"
92+
"}"
8293
],
8394
"description": "Dev Proxy response header"
8495
},
@@ -129,7 +140,9 @@
129140
"body": [
130141
"{",
131142
"\t\"\\$schema\": \"https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v1.0/crudapiplugin.schema.json\",",
132-
"\t\"actions\": [$1],",
143+
"\t\"actions\": [",
144+
"\t\t$1",
145+
"\t],",
133146
"\t\"baseUrl\": \"$2\",",
134147
"\t\"dataFile\": \"$3\"",
135148
"}"
@@ -146,13 +159,12 @@
146159
"CrudApiPluginAction": {
147160
"prefix": "devproxy-plugin-crud-api-action",
148161
"body": [
149-
"\r",
150-
"\t{",
151-
"\t\t\"action\": \"$1\",",
152-
"\t\t\"method\": \"$2\",",
153-
"\t\t\"query\": \"$3\",",
154-
"\t\t\"url\": \"$4\"",
155-
"\t}\r"
162+
"{",
163+
"\t\"action\": \"$1\",",
164+
"\t\"method\": \"$2\",",
165+
"\t\"query\": \"$3\",",
166+
"\t\"url\": \"$4\"",
167+
"}"
156168
],
157169
"description": "CrudApiPlugin action"
158170
},
@@ -224,7 +236,9 @@
224236
"body": [
225237
"{",
226238
"\t\"\\$schema\": \"https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v1.0/genericrandomerrorplugin.schema.json\",",
227-
"\t\"responses\": [$1]",
239+
"\t\"responses\": [",
240+
"\t\t$1",
241+
"\t]",
228242
"}"
229243
],
230244
"description": "GenericRandomErrorPlugin errors file"
@@ -543,9 +557,13 @@
543557
"body": [
544558
"{",
545559
"\t\"\\$schema\": \"https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v1.0/ratelimitingplugin.schema.json\",",
546-
"\t\"body\": {$1},",
547-
"\t\"headers\": [$2],",
548-
"\t\"statusCode\": 429$3",
560+
"\t\"body\": {",
561+
"\t\t$1",
562+
"\t},",
563+
"\t\"headers\": [",
564+
"\t\t$2",
565+
"\t],",
566+
"\t\"statusCode\": ${3:429}",
549567
"}"
550568
],
551569
"description": "Dev Proxy rate limiting file"

0 commit comments

Comments
 (0)