File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed
src/Microsoft.OpenApi/Reader
test/Microsoft.OpenApi.Readers.Tests/OpenApiReaderTests Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ var httpClient = new HttpClient
8484var stream = await httpClient .GetStreamAsync (" master/examples/v3.0/petstore.yaml" );
8585
8686// Read V3 as YAML
87- var openApiDocument = new OpenApiStreamReader (). Read (stream , out var diagnostic ) ;
87+ var openApiDocument = OpenApiDocument . LoadAsync (stream ). OpenApiDocument ;
8888
8989// Write V2 as JSON
9090var outputString = openApiDocument .Serialize (OpenApiSpecVersion .OpenApi2_0 , OpenApiFormat .Json );
Original file line number Diff line number Diff line change 55using System . Collections . Generic ;
66using System . IO ;
77using System . Text . Json . Nodes ;
8- using Microsoft . OpenApi . Any ;
98using Microsoft . OpenApi . Interfaces ;
109using Microsoft . OpenApi . MicrosoftExtensions ;
1110using Microsoft . OpenApi . Validations ;
@@ -77,7 +76,7 @@ public class OpenApiReaderSettings
7776
7877 /// <summary>
7978 /// Whether to leave the <see cref="Stream"/> object open after reading
80- /// from an OpenApiStreamReader object.
79+ /// from a StreamReader object.
8180 /// </summary>
8281 public bool LeaveStreamOpen { get ; set ; }
8382
Original file line number Diff line number Diff line change 1111
1212namespace Microsoft . OpenApi . Readers . Tests . OpenApiReaderTests
1313{
14- public class OpenApiStreamReaderTests
14+ public class OpenApiDocumentLoadTests
1515 {
1616 private const string SampleFolderPath = "V3Tests/Samples/OpenApiDocument/" ;
1717
18- public OpenApiStreamReaderTests ( )
18+ public OpenApiDocumentLoadTests ( )
1919 {
2020 OpenApiReaderRegistry . RegisterReader ( "yaml" , new OpenApiYamlReader ( ) ) ;
2121 }
You can’t perform that action at this time.
0 commit comments