Skip to content

Commit ef9c335

Browse files
Merge branch 'main' into cancellation-tokens
2 parents 0054bba + 03d242d commit ef9c335

File tree

57 files changed

+1612
-51
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1612
-51
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353

5454
# Initializes the CodeQL tools for scanning.
5555
- name: Initialize CodeQL
56-
uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
56+
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
5757
with:
5858
languages: ${{ matrix.language }}
5959
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -81,4 +81,4 @@ jobs:
8181
run: dotnet build --no-restore -c Release
8282

8383
- name: Perform CodeQL Analysis
84-
uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
84+
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2

DevProxy.Abstractions/DevProxy.Abstractions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<RootNamespace>DevProxy.Abstractions</RootNamespace>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8-
<Version>0.29.2</Version>
8+
<Version>1.0.0</Version>
99
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
1010
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
1111
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

DevProxy.Plugins/DevProxy.Plugins.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Nullable>enable</Nullable>
77
<EnableDynamicLoading>true</EnableDynamicLoading>
88
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
9-
<Version>0.29.2</Version>
9+
<Version>1.0.0</Version>
1010
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
1111
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
1212
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

DevProxy.Plugins/Generation/OpenApiSpecGeneratorPlugin.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public sealed class OpenApiSpecGeneratorPluginConfiguration
5555
public bool IncludeOptionsRequests { get; set; }
5656
public SpecFormat SpecFormat { get; set; } = SpecFormat.Json;
5757
public SpecVersion SpecVersion { get; set; } = SpecVersion.v3_0;
58+
public bool IgnoreResponseTypes { get; set; }
5859
}
5960

6061
public sealed class OpenApiSpecGeneratorPlugin(
@@ -415,6 +416,15 @@ private void SetResponseFromSession(OpenApiOperation operation, Response respons
415416
if (contentType.StartsWith("application/json", StringComparison.OrdinalIgnoreCase))
416417
{
417418
Logger.LogDebug(" Processing JSON body...");
419+
if (Configuration.IgnoreResponseTypes)
420+
{
421+
Logger.LogDebug(" Ignoring response types");
422+
return new()
423+
{
424+
Type = "string"
425+
};
426+
}
427+
418428
return GetSchemaFromJsonString(body);
419429
}
420430

DevProxy.Plugins/Mocking/MockResponsePlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public sealed class MockResponseConfiguration
3535
[JsonIgnore]
3636
public bool NoMocks { get; set; }
3737
[JsonPropertyName("$schema")]
38-
public string Schema { get; set; } = "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/mockresponseplugin.mocksfile.schema.json";
38+
public string Schema { get; set; } = "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/mockresponseplugin.mocksfile.schema.json";
3939
}
4040

4141
public class MockResponsePlugin(

DevProxy/DevProxy.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<Nullable>enable</Nullable>
99
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1010
<Title>Dev Proxy</Title>
11-
<Version>0.29.2</Version>
11+
<Version>1.0.0</Version>
1212
<Company>.NET Foundation</Company>
1313
<Product>Dev Proxy</Product>
1414
<AssemblyName>devproxy</AssemblyName>

DevProxy/config/m365-mocks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/mockresponseplugin.mocksfile.schema.json",
2+
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/mockresponseplugin.mocksfile.schema.json",
33
"mocks": [
44
{
55
"request": {

DevProxy/config/m365.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/rc.schema.json",
2+
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/rc.schema.json",
33
"plugins": [
44
{
55
"name": "DevToolsPlugin",
@@ -173,11 +173,11 @@
173173
"https://*.sharepoint-df.*/*_vti_bin/*"
174174
],
175175
"mocksPlugin": {
176-
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/mockresponseplugin.schema.json",
176+
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/mockresponseplugin.schema.json",
177177
"mocksFile": "m365-mocks.json"
178178
},
179179
"graphRandomErrorsPlugin": {
180-
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/graphrandomerrorplugin.schema.json",
180+
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/graphrandomerrorplugin.schema.json",
181181
"allowedErrors": [
182182
429,
183183
500,
@@ -189,28 +189,28 @@
189189
"rate": 50
190190
},
191191
"executionSummaryPlugin": {
192-
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/executionsummaryplugin.schema.json",
192+
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/executionsummaryplugin.schema.json",
193193
"groupBy": "url"
194194
},
195195
"graphMinimalPermissionsPlugin": {
196-
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/graphminimalpermissionsplugin.schema.json",
196+
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/graphminimalpermissionsplugin.schema.json",
197197
"type": "delegated"
198198
},
199199
"cachingGuidance": {
200-
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/cachingguidanceplugin.schema.json",
200+
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/cachingguidanceplugin.schema.json",
201201
"cacheThresholdSeconds": 5
202202
},
203203
"latencyPlugin": {
204-
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/latencyplugin.schema.json",
204+
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/latencyplugin.schema.json",
205205
"minMs": 200,
206206
"maxMs": 10000
207207
},
208208
"devTools": {
209-
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/devtoolsplugin.schema.json",
209+
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/devtoolsplugin.schema.json",
210210
"preferredBrowser": "Edge"
211211
},
212212
"rateLimiting": {
213-
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/ratelimitingplugin.schema.json",
213+
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/ratelimitingplugin.schema.json",
214214
"costPerRequest": 2,
215215
"rateLimit": 120,
216216
"retryAfterSeconds": 5

DevProxy/config/microsoft-graph-rate-limiting.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/rc.schema.json",
2+
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/rc.schema.json",
33
"plugins": [
44
{
55
"name": "RateLimitingPlugin",

DevProxy/config/microsoft-graph.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/rc.schema.json",
2+
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/rc.schema.json",
33
"plugins": [
44
{
55
"name": "GraphSelectGuidancePlugin",
@@ -67,7 +67,7 @@
6767
"https://microsoftgraph.chinacloudapi.cn/beta/*"
6868
],
6969
"graphRandomErrorsPlugin": {
70-
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/graphrandomerrorplugin.schema.json",
70+
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/graphrandomerrorplugin.schema.json",
7171
"allowedErrors": [
7272
429,
7373
500,
@@ -79,7 +79,7 @@
7979
"rate": 50
8080
},
8181
"executionSummaryPlugin": {
82-
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.29.2/executionsummaryplugin.schema.json",
82+
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/executionsummaryplugin.schema.json",
8383
"groupBy": "url"
8484
},
8585
"labelMode": "text",

0 commit comments

Comments
 (0)