Skip to content

Commit 4236fba

Browse files
Adds Graph presets (#240)
1 parent 1f0b610 commit 4236fba

File tree

3 files changed

+97
-0
lines changed

3 files changed

+97
-0
lines changed

msgraph-developer-proxy/msgraph-developer-proxy.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@
5252
<None Update="responses.sample.json">
5353
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
5454
</None>
55+
<None Update="presets\microsoft-graph.json">
56+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
57+
</None>
58+
<None Update="presets\microsoft-graph-rate-limiting.json">
59+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
60+
</None>
5561
</ItemGroup>
5662

5763
</Project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"plugins": [
3+
{
4+
"name": "RateLimitingPlugin",
5+
"enabled": true,
6+
"pluginPath": "GraphProxyPlugins\\msgraph-developer-proxy-plugins.dll"
7+
}
8+
],
9+
"urlsToWatch": [
10+
"https://graph.microsoft.com/*/drive*",
11+
"https://graph.microsoft.com/*/shares/*",
12+
"https://graph.microsoft.com/*/sites/*",
13+
"https://graph.microsoft.us/*/drive*",
14+
"https://graph.microsoft.us/*/shares/*",
15+
"https://graph.microsoft.us/*/sites/*",
16+
"https://dod-graph.microsoft.us/*/drive*",
17+
"https://dod-graph.microsoft.us/*/shares/*",
18+
"https://dod-graph.microsoft.us/*/sites/*",
19+
"https://microsoftgraph.chinacloudapi.cn/*/drive*",
20+
"https://microsoftgraph.chinacloudapi.cn/*/shares/*",
21+
"https://microsoftgraph.chinacloudapi.cn/*/sites/*"
22+
],
23+
"labelMode": "text",
24+
"logLevel": "info"
25+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"plugins": [
3+
{
4+
"name": "GraphSelectGuidancePlugin",
5+
"enabled": true,
6+
"pluginPath": "GraphProxyPlugins\\msgraph-developer-proxy-plugins.dll"
7+
},
8+
{
9+
"name": "GraphBetaSupportGuidancePlugin",
10+
"enabled": true,
11+
"pluginPath": "GraphProxyPlugins\\msgraph-developer-proxy-plugins.dll",
12+
"urlsToWatch": [
13+
"https://graph.microsoft.com/beta/*",
14+
"https://graph.microsoft.us/beta/*",
15+
"https://dod-graph.microsoft.us/beta/*",
16+
"https://microsoftgraph.chinacloudapi.cn/beta/*"
17+
]
18+
},
19+
{
20+
"name": "GraphSdkGuidancePlugin",
21+
"enabled": true,
22+
"pluginPath": "GraphProxyPlugins\\msgraph-developer-proxy-plugins.dll"
23+
},
24+
{
25+
"name": "ODataPagingGuidancePlugin",
26+
"enabled": true,
27+
"pluginPath": "GraphProxyPlugins\\msgraph-developer-proxy-plugins.dll"
28+
},
29+
{
30+
"name": "GraphClientRequestIdGuidancePlugin",
31+
"enabled": true,
32+
"pluginPath": "GraphProxyPlugins\\msgraph-developer-proxy-plugins.dll"
33+
},
34+
{
35+
"name": "GraphRandomErrorPlugin",
36+
"enabled": true,
37+
"pluginPath": "GraphProxyPlugins\\msgraph-developer-proxy-plugins.dll",
38+
"configSection": "graphRandomErrorsPlugin"
39+
},
40+
{
41+
"name": "ExecutionSummaryPlugin",
42+
"enabled": true,
43+
"pluginPath": "GraphProxyPlugins\\msgraph-developer-proxy-plugins.dll",
44+
"configSection": "executionSummaryPlugin"
45+
}
46+
],
47+
"urlsToWatch": [
48+
"https://graph.microsoft.com/v1.0/*",
49+
"https://graph.microsoft.com/beta/*",
50+
"https://graph.microsoft.us/v1.0/*",
51+
"https://graph.microsoft.us/beta/*",
52+
"https://dod-graph.microsoft.us/v1.0/*",
53+
"https://dod-graph.microsoft.us/beta/*",
54+
"https://microsoftgraph.chinacloudapi.cn/v1.0/*",
55+
"https://microsoftgraph.chinacloudapi.cn/beta/*"
56+
],
57+
"graphRandomErrorsPlugin": {
58+
"rate": 50,
59+
"allowedErrors": [ 429, 500, 502, 503, 504, 507 ]
60+
},
61+
"executionSummaryPlugin": {
62+
"groupBy": "url"
63+
},
64+
"labelMode": "text",
65+
"logLevel": "info"
66+
}

0 commit comments

Comments
 (0)