Skip to content

Commit 11e5c63

Browse files
committed
Update output file extension and register the Yaml reader
1 parent c0332af commit 11e5c63

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/Microsoft.OpenApi.Hidi.Tests/Services/OpenApiServiceTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public async Task TransformCommandConvertsOpenApiWithDefaultOutputNameAndSwitchF
206206
// create a dummy ILogger instance for testing
207207
await OpenApiService.TransformOpenApiDocument(options, _logger);
208208

209-
var output = await File.ReadAllTextAsync("output.yml");
209+
var output = await File.ReadAllTextAsync("output.yaml");
210210
Assert.NotEmpty(output);
211211
}
212212

@@ -242,7 +242,7 @@ public async Task TransformToPowerShellCompliantOpenApi()
242242
// create a dummy ILogger instance for testing
243243
await OpenApiService.TransformOpenApiDocument(options, _logger);
244244

245-
var output = await File.ReadAllTextAsync("output.yml");
245+
var output = await File.ReadAllTextAsync("output.yaml");
246246
Assert.NotEmpty(output);
247247
}
248248

test/Microsoft.OpenApi.Readers.Tests/V2Tests/ComparisonTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.IO;
55
using FluentAssertions;
66
using Microsoft.OpenApi.Models;
7+
using Microsoft.OpenApi.Reader;
78
using Xunit;
89

910
namespace Microsoft.OpenApi.Readers.Tests.V2Tests
@@ -19,6 +20,7 @@ public class ComparisonTests
1920
//[InlineData("definitions")] //Currently broken due to V3 references not behaving the same as V2
2021
public void EquivalentV2AndV3DocumentsShouldProductEquivalentObjects(string fileName)
2122
{
23+
OpenApiReaderRegistry.RegisterReader("yaml", new OpenApiYamlReader());
2224
using var streamV2 = Resources.GetStream(Path.Combine(SampleFolderPath, $"{fileName}.v2.yaml"));
2325
using var streamV3 = Resources.GetStream(Path.Combine(SampleFolderPath, $"{fileName}.v3.yaml"));
2426
var result1 = OpenApiDocument.Load(Path.Combine(SampleFolderPath, $"{fileName}.v2.yaml"));

0 commit comments

Comments
 (0)