File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Microsoft.OpenApi.Hidi.Tests/Services
Microsoft.OpenApi.Readers.Tests/V2Tests Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ public async Task TransformCommandConvertsOpenApiWithDefaultOutputNameAndSwitchF
206
206
// create a dummy ILogger instance for testing
207
207
await OpenApiService . TransformOpenApiDocument ( options , _logger ) ;
208
208
209
- var output = await File . ReadAllTextAsync ( "output.yml " ) ;
209
+ var output = await File . ReadAllTextAsync ( "output.yaml " ) ;
210
210
Assert . NotEmpty ( output ) ;
211
211
}
212
212
@@ -242,7 +242,7 @@ public async Task TransformToPowerShellCompliantOpenApi()
242
242
// create a dummy ILogger instance for testing
243
243
await OpenApiService . TransformOpenApiDocument ( options , _logger ) ;
244
244
245
- var output = await File . ReadAllTextAsync ( "output.yml " ) ;
245
+ var output = await File . ReadAllTextAsync ( "output.yaml " ) ;
246
246
Assert . NotEmpty ( output ) ;
247
247
}
248
248
Original file line number Diff line number Diff line change 4
4
using System . IO ;
5
5
using FluentAssertions ;
6
6
using Microsoft . OpenApi . Models ;
7
+ using Microsoft . OpenApi . Reader ;
7
8
using Xunit ;
8
9
9
10
namespace Microsoft . OpenApi . Readers . Tests . V2Tests
@@ -19,6 +20,7 @@ public class ComparisonTests
19
20
//[InlineData("definitions")] //Currently broken due to V3 references not behaving the same as V2
20
21
public void EquivalentV2AndV3DocumentsShouldProductEquivalentObjects ( string fileName )
21
22
{
23
+ OpenApiReaderRegistry . RegisterReader ( "yaml" , new OpenApiYamlReader ( ) ) ;
22
24
using var streamV2 = Resources . GetStream ( Path . Combine ( SampleFolderPath , $ "{ fileName } .v2.yaml") ) ;
23
25
using var streamV3 = Resources . GetStream ( Path . Combine ( SampleFolderPath , $ "{ fileName } .v3.yaml") ) ;
24
26
var result1 = OpenApiDocument . Load ( Path . Combine ( SampleFolderPath , $ "{ fileName } .v2.yaml") ) ;
You can’t perform that action at this time.
0 commit comments