Skip to content

Commit ef39aa4

Browse files
authored
Add $schema property to all config section snippets. Closes #195 (#198)
Closes #195
1 parent 5552773 commit ef39aa4

File tree

2 files changed

+34
-10
lines changed

2 files changed

+34
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
- Snippets: All snippets that reference schemas updated to use `v0.25.0` schema
1616
- Code action: Updated update schema code action to reflect the move to dotnet organisation in Github
1717
- Snippets: `rate` property added to `devproxy-plugin-generic-random-error-config` and `devproxy-plugin-graph-random-error-config`
18+
- Snippets: `$schema` property added to all config section snippets
1819

1920
### Fixed:
2021

src/snippets.json

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"prefix": "devproxy-mocks-file",
4343
"body": [
4444
"{",
45-
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/mockresponseplugin.schema.json\",",
45+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/mockresponseplugin.mocksfile.schema.json\",",
4646
"\t\"mocks\": [",
4747
"\t\t$1",
4848
"\t]",
@@ -53,7 +53,7 @@
5353
"MocksFileSchema": {
5454
"prefix": "devproxy-mocks-file-schema",
5555
"body": [
56-
"\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/mockresponseplugin.schema.json\","
56+
"\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/mockresponseplugin.mocksfile.schema.json\","
5757
],
5858
"description": "Dev Proxy mocks file schema"
5959
},
@@ -126,6 +126,7 @@
126126
"prefix": "devproxy-plugin-auth-config-apikey",
127127
"body": [
128128
"\"auth\": {",
129+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/authplugin.schema.json\",",
129130
"\t\"type\": \"apiKey\",",
130131
"\t\"apiKey\": {",
131132
"\t\t\"parameters\": [",
@@ -150,6 +151,7 @@
150151
"prefix": "devproxy-plugin-auth-config-oauth2",
151152
"body": [
152153
"\"auth\": {",
154+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/authplugin.schema.json\",",
153155
"\t\"type\": \"oauth2\",",
154156
"\t\"oauth2\": {",
155157
"\t\t\"metadataUrl\": \"https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration\",",
@@ -192,6 +194,7 @@
192194
"prefix": "devproxy-plugin-api-center-minimal-permissions-config",
193195
"body": [
194196
"\"apiCenterMinimalPermissionsPlugin\": {",
197+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/apicenterminimalpermissionsplugin.schema.json\",",
195198
"\t\"subscriptionId\": \"cdae2297-7aa6-4195-bbb1-dcd89153cc72\",",
196199
"\t\"resourceGroupName\": \"resource-group-name\",",
197200
"\t\"serviceName\": \"apic-instance\",",
@@ -216,6 +219,7 @@
216219
"prefix": "devproxy-plugin-api-center-onboarding-config",
217220
"body": [
218221
"\"apiCenterOnboardingPlugin\": {",
222+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/apicenteronboardingplugin.schema.json\",",
219223
"\t\"subscriptionId\": \"cdae2297-7aa6-4195-bbb1-dcd89153cc72\",",
220224
"\t\"resourceGroupName\": \"resource-group-name\",",
221225
"\t\"serviceName\": \"apic-instance\",",
@@ -241,6 +245,7 @@
241245
"prefix": "devproxy-plugin-api-center-production-version-config",
242246
"body": [
243247
"\"apiCenterProductionVersionPlugin\": {",
248+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/apicenterproductionversionplugin.schema.json\",",
244249
"\t\"subscriptionId\": \"cdae2297-7aa6-4195-bbb1-dcd89153cc72\",",
245250
"\t\"resourceGroupName\": \"resource-group-name\",",
246251
"\t\"serviceName\": \"apic-instance\",",
@@ -264,6 +269,7 @@
264269
"prefix": "devproxy-plugin-caching-guidance-config",
265270
"body": [
266271
"\"cachingGuidance\": {",
272+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/cachingguidanceplugin.schema.json\",",
267273
"\t\"cacheThresholdSeconds\": 5",
268274
"}"
269275
],
@@ -285,6 +291,7 @@
285291
"prefix": "devproxy-plugin-crud-api-config",
286292
"body": [
287293
"\"customersApi\": {",
294+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/crudapiplugin.schema.json\",",
288295
"\t\"apiFile\": \"customers-api.json\"",
289296
"}"
290297
],
@@ -294,7 +301,7 @@
294301
"prefix": "devproxy-plugin-crud-api-file",
295302
"body": [
296303
"{",
297-
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/crudapiplugin.schema.json\",",
304+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/crudapiplugin.apifile.schema.json\",",
298305
"\t\"actions\": [",
299306
"\t\t$1",
300307
"\t],",
@@ -307,7 +314,7 @@
307314
"CrudApiPluginFileSchema": {
308315
"prefix": "devproxy-plugin-crud-api-file-schema",
309316
"body": [
310-
"\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/crudapiplugin.schema.json\","
317+
"\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/crudapiplugin.apifile.schema.json\","
311318
],
312319
"description": "CrudApiPlugin API file schema"
313320
},
@@ -338,6 +345,7 @@
338345
"prefix": "devproxy-plugin-dev-tools-config",
339346
"body": [
340347
"\"devTools\": {",
348+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/devtoolsplugin.schema.json\",",
341349
"\t\"preferredBrowser\": \"Edge\"",
342350
"}"
343351
],
@@ -359,6 +367,7 @@
359367
"prefix": "devproxy-plugin-entra-mock-response-config",
360368
"body": [
361369
"\"entraMockResponsePlugin\": {",
370+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/mockresponseplugin.schema.json\",",
362371
"\t\"mocksFile\": \"mocks.json\"",
363372
"}"
364373
],
@@ -379,6 +388,7 @@
379388
"prefix": "devproxy-plugin-execution-summary-config",
380389
"body": [
381390
"\"executionSummaryPlugin\": {",
391+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/executionsummaryplugin.schema.json\",",
382392
"\t\"groupBy\": \"url\"",
383393
"}"
384394
],
@@ -400,7 +410,8 @@
400410
"prefix": "devproxy-plugin-generic-random-error-config",
401411
"body": [
402412
"\"genericRandomErrorPlugin\": {",
403-
"\t\"errorsFile\": \"errors.json\"",
413+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/genericrandomerrorplugin.schema.json\",",
414+
"\t\"errorsFile\": \"errors.json\",",
404415
"\t\"rate\": 50",
405416
"}"
406417
],
@@ -410,7 +421,7 @@
410421
"prefix": "devproxy-plugin-generic-random-error-file",
411422
"body": [
412423
"{",
413-
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/genericrandomerrorplugin.schema.json\",",
424+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/genericrandomerrorplugin.errorsfile.schema.json\",",
414425
"\t\"errors\": [",
415426
"\t\t$1",
416427
"\t]",
@@ -421,7 +432,7 @@
421432
"GenericRandomErrorPluginFileSchema": {
422433
"prefix": "devproxy-plugin-generic-random-error-file-schema",
423434
"body": [
424-
"\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/genericrandomerrorplugin.schema.json\","
435+
"\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/genericrandomerrorplugin.errorsfile.schema.json\","
425436
],
426437
"description": "GenericRandomErrorPlugin errors file schema"
427438
},
@@ -478,6 +489,7 @@
478489
"prefix": "devproxy-plugin-graph-minimal-permissions-guidance-config",
479490
"body": [
480491
"\"graphMinimalPermissionsGuidancePlugin\": {",
492+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/graphminimalpermissionsguidanceplugin.schema.json\",",
481493
"\t\"permissionsToIgnore\": [",
482494
"\t\t\"profile\",",
483495
"\t\t\"openid\",",
@@ -503,6 +515,7 @@
503515
"prefix": "devproxy-plugin-graph-minimal-permissions-config",
504516
"body": [
505517
"\"graphMinimalPermissionsPlugin\": {",
518+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/graphmininalpermissionsplugin.schema.json\",",
506519
"\t\"type\": \"delegated\"",
507520
"}"
508521
],
@@ -534,6 +547,7 @@
534547
"prefix": "devproxy-plugin-graph-mock-response-config",
535548
"body": [
536549
"\"graphMockResponsePlugin\": {",
550+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/mockresponseplugin.schema.json\",",
537551
"\t\"mocksFile\": \"mocks.json\"",
538552
"}"
539553
],
@@ -564,6 +578,7 @@
564578
"prefix": "devproxy-plugin-graph-random-error-config",
565579
"body": [
566580
"\"graphRandomErrorPlugin\": {",
581+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/graphrandomerrorplugin.schema.json\",",
567582
"\t\"allowedErrors\": [ 429, 500, 502, 503, 504, 507 ]",
568583
"\t\"rate\": 50",
569584
"}"
@@ -627,6 +642,7 @@
627642
"prefix": "devproxy-plugin-http-file-generator-config",
628643
"body": [
629644
"\"httpFileGeneratorPlugin\": {",
645+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/httpfilegeneratorplugin.schema.json\",",
630646
"\t\"includeOptionsRequests\": false",
631647
"}"
632648
],
@@ -648,6 +664,7 @@
648664
"prefix": "devproxy-plugin-latency-config",
649665
"body": [
650666
"\"latencyPlugin\": {",
667+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/latencyplugin.schema.json\",",
651668
"\t\"minMs\": 200,",
652669
"\t\"maxMs\": 10000",
653670
"}"
@@ -669,6 +686,7 @@
669686
"prefix": "devproxy-plugin-minimal-permissions-config",
670687
"body": [
671688
"\"minimalPermissionsPlugin\": {",
689+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/minimalpermissionsplugin.schema.json\",",
672690
"\t\"apiSpecsFolderPath\": \"./api-specs\"",
673691
"}"
674692
],
@@ -701,6 +719,7 @@
701719
"prefix": "devproxy-plugin-mock-request-config",
702720
"body": [
703721
"\"mockRequestPlugin\": {",
722+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/mockrequestplugin.schema.json\",",
704723
"\t\"mockFile\": \"mock-request.json\"",
705724
"}"
706725
],
@@ -722,6 +741,7 @@
722741
"prefix": "devproxy-plugin-mock-response-config",
723742
"body": [
724743
"\"mockResponsePlugin\": {",
744+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/mockresponseplugin.schema.json\",",
725745
"\t\"mocksFile\": \"mocks.json\"",
726746
"}"
727747
],
@@ -730,7 +750,7 @@
730750
"MockResponsePluginFileSchema": {
731751
"prefix": "devproxy-plugin-mock-response-schema",
732752
"body": [
733-
"\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/mockresponseplugin.schema.json\","
753+
"\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/mockresponseplugin.mocksfile.schema.json\","
734754
],
735755
"description": "MockResponsePlugin schema"
736756
},
@@ -792,6 +812,7 @@
792812
"prefix": "devproxy-plugin-open-api-spec-generator-config",
793813
"body": [
794814
"\"openApiSpecGeneratorPlugin\": {",
815+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/openapispecgeneratorplugin.schema.json\",",
795816
"\t\"includeOptionsRequests\": false,",
796817
"\t\"specVersion\": \"v3_0\",",
797818
"\t\"specFormat\": \"Json\"",
@@ -814,6 +835,7 @@
814835
"prefix": "devproxy-plugin-rate-limiting-config",
815836
"body": [
816837
"\"rateLimiting\": {",
838+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/ratelimitingplugin.schema.json\",",
817839
"\t\"costPerRequest\": 2,",
818840
"\t\"rateLimit\": 120,",
819841
"\t\"retryAfterSeconds\": 5",
@@ -825,7 +847,7 @@
825847
"prefix": "devproxy-plugin-rate-limiting-file",
826848
"body": [
827849
"{",
828-
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/ratelimitingplugin.schema.json\",",
850+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/ratelimitingplugin.customresponsefile.schema.json\",",
829851
"\t\"body\": {",
830852
"\t\t$1",
831853
"\t},",
@@ -840,7 +862,7 @@
840862
"RateLimitingFileSchema": {
841863
"prefix": "devproxy-plugin-rate-limiting-file-schema",
842864
"body": [
843-
"\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/ratelimitingplugin.schema.json\","
865+
"\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/ratelimitingplugin.customresponsefile.schema.json\","
844866
],
845867
"description": "Dev Proxy rate limiting file schema"
846868
},
@@ -871,6 +893,7 @@
871893
"prefix": "devproxy-plugin-rewrite-config",
872894
"body": [
873895
"\"rewritePlugin\": {",
896+
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.25.0/rewriteplugin.schema.json\",",
874897
"\t\"rewritesFile\": \"rewrites.json\"",
875898
"}"
876899
],

0 commit comments

Comments
 (0)