Skip to content

Commit 53c7441

Browse files
authored
Merge pull request #1377 from SimonCropp/remove-some-un-used-fields
remove some un used fields
2 parents af877cc + 0bb99af commit 53c7441

22 files changed

+1
-158
lines changed

src/Microsoft.OpenApi.Readers/Services/OpenApiRemoteReferenceCollector.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ namespace Microsoft.OpenApi.Readers.Services
1313
/// </summary>
1414
internal class OpenApiRemoteReferenceCollector : OpenApiVisitorBase
1515
{
16-
private OpenApiDocument _document;
1716
private Dictionary<string, OpenApiReference> _references = new Dictionary<string, OpenApiReference>();
18-
public OpenApiRemoteReferenceCollector(OpenApiDocument document)
19-
{
20-
_document = document;
21-
}
2217

2318
/// <summary>
2419
/// List of external references collected from OpenApiDocument

src/Microsoft.OpenApi.Readers/Services/OpenApiWorkspaceLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal async Task<OpenApiDiagnostic> LoadAsync(OpenApiReference reference, Ope
2626
document.Workspace = _workspace;
2727

2828
// Collect remote references by walking document
29-
var referenceCollector = new OpenApiRemoteReferenceCollector(document);
29+
var referenceCollector = new OpenApiRemoteReferenceCollector();
3030
var collectorWalker = new OpenApiWalker(referenceCollector);
3131
collectorWalker.Walk(document);
3232

test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDocumentTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ public class OpenApiDocumentTests
2424
{
2525
private const string SampleFolderPath = "V3Tests/Samples/OpenApiDocument/";
2626

27-
private readonly ITestOutputHelper _output;
28-
2927
public T Clone<T>(T element) where T : IOpenApiSerializable
3028
{
3129
using var stream = new MemoryStream();

test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using Microsoft.OpenApi.Writers;
1010
using VerifyXunit;
1111
using Xunit;
12-
using Xunit.Abstractions;
1312

1413
namespace Microsoft.OpenApi.Tests.Models
1514
{
@@ -98,13 +97,6 @@ public class OpenApiCallbackTests
9897
}
9998
};
10099

101-
private readonly ITestOutputHelper _output;
102-
103-
public OpenApiCallbackTests(ITestOutputHelper output)
104-
{
105-
_output = output;
106-
}
107-
108100
[Theory]
109101
[InlineData(true)]
110102
[InlineData(false)]

test/Microsoft.OpenApi.Tests/Models/OpenApiComponentsTests.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using Microsoft.OpenApi.Extensions;
88
using Microsoft.OpenApi.Models;
99
using Xunit;
10-
using Xunit.Abstractions;
1110

1211
namespace Microsoft.OpenApi.Tests.Models
1312
{
@@ -245,13 +244,6 @@ public class OpenApiComponentsTests
245244
}
246245
};
247246

248-
private readonly ITestOutputHelper _output;
249-
250-
public OpenApiComponentsTests(ITestOutputHelper output)
251-
{
252-
_output = output;
253-
}
254-
255247
[Fact]
256248
public void SerializeBasicComponentsAsJsonWorks()
257249
{

test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,13 +1278,6 @@ public class OpenApiDocumentTests
12781278
Components = AdvancedComponents
12791279
};
12801280

1281-
private readonly ITestOutputHelper _output;
1282-
1283-
public OpenApiDocumentTests(ITestOutputHelper output)
1284-
{
1285-
_output = output;
1286-
}
1287-
12881281
[Theory]
12891282
[InlineData(false)]
12901283
[InlineData(true)]

test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
using Microsoft.OpenApi.Writers;
1212
using VerifyXunit;
1313
using Xunit;
14-
using Xunit.Abstractions;
1514

1615
namespace Microsoft.OpenApi.Tests.Models
1716
{
@@ -101,13 +100,6 @@ public class OpenApiExampleTests
101100
}
102101
};
103102

104-
private readonly ITestOutputHelper _output;
105-
106-
public OpenApiExampleTests(ITestOutputHelper output)
107-
{
108-
_output = output;
109-
}
110-
111103
[Theory]
112104
[InlineData(true)]
113105
[InlineData(false)]

test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ public class OpenApiHeaderTests
4141
}
4242
};
4343

44-
private readonly ITestOutputHelper _output;
45-
46-
public OpenApiHeaderTests(ITestOutputHelper output)
47-
{
48-
_output = output;
49-
}
50-
5144
[Theory]
5245
[InlineData(true)]
5346
[InlineData(false)]

test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using Microsoft.OpenApi.Writers;
1111
using VerifyXunit;
1212
using Xunit;
13-
using Xunit.Abstractions;
1413

1514
namespace Microsoft.OpenApi.Tests.Models
1615
{
@@ -71,13 +70,6 @@ public class OpenApiLinkTests
7170
}
7271
};
7372

74-
private readonly ITestOutputHelper _output;
75-
76-
public OpenApiLinkTests(ITestOutputHelper output)
77-
{
78-
_output = output;
79-
}
80-
8173
[Theory]
8274
[InlineData(true)]
8375
[InlineData(false)]

test/Microsoft.OpenApi.Tests/Models/OpenApiOAuthFlowTests.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using Microsoft.OpenApi.Extensions;
88
using Microsoft.OpenApi.Models;
99
using Xunit;
10-
using Xunit.Abstractions;
1110

1211
namespace Microsoft.OpenApi.Tests.Models
1312
{
@@ -38,13 +37,6 @@ public class OpenApiOAuthFlowTests
3837
}
3938
};
4039

41-
private readonly ITestOutputHelper _output;
42-
43-
public OpenApiOAuthFlowTests(ITestOutputHelper output)
44-
{
45-
_output = output;
46-
}
47-
4840
[Fact]
4941
public void SerializeBasicOAuthFlowAsV3JsonWorks()
5042
{

0 commit comments

Comments
 (0)