diff --git a/Directory.Packages.props b/Directory.Packages.props
index 9c25c8b1d13..45544a15560 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -21,7 +21,7 @@
-
+
diff --git a/documentation/openapi.json b/documentation/openapi.json
index aefed589a51..575af5e61af 100644
--- a/documentation/openapi.json
+++ b/documentation/openapi.json
@@ -2079,14 +2079,13 @@
"nullable": true
},
"error": {
+ "type": "object",
"oneOf": [
- {
- "nullable": true
- },
{
"$ref": "#/components/schemas/OperationError"
}
- ]
+ ],
+ "nullable": true
},
"operationId": {
"type": "string",
@@ -2100,14 +2099,13 @@
"$ref": "#/components/schemas/OperationState"
},
"process": {
+ "type": "object",
"oneOf": [
- {
- "nullable": true
- },
{
"$ref": "#/components/schemas/OperationProcessInfo"
}
- ]
+ ],
+ "nullable": true
},
"egressProviderName": {
"type": "string",
@@ -2143,14 +2141,13 @@
"$ref": "#/components/schemas/OperationState"
},
"process": {
+ "type": "object",
"oneOf": [
- {
- "nullable": true
- },
{
"$ref": "#/components/schemas/OperationProcessInfo"
}
- ]
+ ],
+ "nullable": true
},
"egressProviderName": {
"type": "string",
diff --git a/eng/dependabot/independent/Packages.props b/eng/dependabot/independent/Packages.props
index 642c5c8f7bc..2d16d2a6d6d 100644
--- a/eng/dependabot/independent/Packages.props
+++ b/eng/dependabot/independent/Packages.props
@@ -10,7 +10,7 @@
-
+
diff --git a/eng/dependabot/independent/Versions.props b/eng/dependabot/independent/Versions.props
index 2ad8e490d7d..43193f83cac 100644
--- a/eng/dependabot/independent/Versions.props
+++ b/eng/dependabot/independent/Versions.props
@@ -7,7 +7,7 @@
12.29.1
12.27.1
4.10.0
- 1.6.29
+ 2.7.5
4.3.2
5.0.0
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen.UnitTests/Microsoft.Diagnostics.Monitoring.OpenApiGen.UnitTests.csproj b/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen.UnitTests/Microsoft.Diagnostics.Monitoring.OpenApiGen.UnitTests.csproj
index 12695464048..5c05f0a841f 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen.UnitTests/Microsoft.Diagnostics.Monitoring.OpenApiGen.UnitTests.csproj
+++ b/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen.UnitTests/Microsoft.Diagnostics.Monitoring.OpenApiGen.UnitTests.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen.UnitTests/OpenApiGeneratorTests.cs b/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen.UnitTests/OpenApiGeneratorTests.cs
index 25e40b09522..003d5c04a72 100644
--- a/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen.UnitTests/OpenApiGeneratorTests.cs
+++ b/src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen.UnitTests/OpenApiGeneratorTests.cs
@@ -3,10 +3,8 @@
using Microsoft.Diagnostics.Monitoring.TestCommon;
using Microsoft.Diagnostics.Monitoring.TestCommon.Runners;
-using Microsoft.OpenApi.Extensions;
-using Microsoft.OpenApi.Models;
-using Microsoft.OpenApi.Readers;
-using Microsoft.OpenApi.Validations;
+using Microsoft.OpenApi;
+using Microsoft.OpenApi.Reader;
using System;
using System.Collections.Generic;
using System.IO;
@@ -80,11 +78,11 @@ public async Task BaselineDifferenceTestAsync()
/// Test that the committed OpenAPI document is valid.
///
[Fact]
- public void BaselineIsValidTest()
+ public async Task BaselineIsValidTestAsync()
{
using FileStream stream = new(OpenApiBaselinePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
- ValidateDocument(stream);
+ await ValidateDocumentAsync(stream);
}
///
@@ -95,7 +93,7 @@ public async Task GeneratedIsValidTestAsync()
{
using FileStream stream = await GenerateDocumentAsync();
- ValidateDocument(stream);
+ await ValidateDocumentAsync(stream);
}
private async Task GenerateDocumentAsync()
@@ -119,13 +117,12 @@ private async Task GenerateDocumentAsync()
return new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 4096, FileOptions.DeleteOnClose);
}
- private static void ValidateDocument(FileStream stream)
+ private static async Task ValidateDocumentAsync(Stream stream)
{
- OpenApiStreamReader reader = new();
- OpenApiDocument document = reader.Read(stream, out OpenApiDiagnostic diagnostic);
- Assert.Empty(diagnostic.Errors);
+ ReadResult result = await OpenApiDocument.LoadAsync(stream, OpenApiConstants.Json);
+ Assert.Empty(result.Diagnostic.Errors);
- IEnumerable errors = document.Validate(ValidationRuleSet.GetDefaultRuleSet());
+ IEnumerable errors = result.Document.Validate(ValidationRuleSet.GetDefaultRuleSet());
Assert.Empty(errors);
}
}