Skip to content

Commit d3685c3

Browse files
authored
Merge pull request #2249 from microsoft/docs/workbench-screenshot
docs: updates workbench screenshot to remove offending number
2 parents e88f0d3 + 0fee1a1 commit d3685c3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/images/workbench.png

-33 KB
Loading

src/Microsoft.OpenApi.Workbench/MainModel.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
using Microsoft.OpenApi.Extensions;
1212
using Microsoft.OpenApi.Models;
1313
using Microsoft.OpenApi.Reader;
14-
using Microsoft.OpenApi.Readers;
1514
using Microsoft.OpenApi.Services;
1615
using Microsoft.OpenApi.Validations;
16+
using Microsoft.OpenApi.Writers;
1717

1818
namespace Microsoft.OpenApi.Workbench
1919
{
@@ -242,7 +242,7 @@ internal async Task ParseDocumentAsync()
242242
: new("file://" + Path.GetDirectoryName(_inputFile) + "/");
243243
}
244244

245-
var readResult = await OpenApiDocument.LoadAsync(stream, Format.GetDisplayName());
245+
var readResult = await OpenApiDocument.LoadAsync(stream, Format.GetDisplayName().ToLowerInvariant(), settings);
246246
var document = readResult.Document;
247247
var context = readResult.Diagnostic;
248248

@@ -298,13 +298,13 @@ internal async Task ParseDocumentAsync()
298298
/// </summary>
299299
private async Task<string> WriteContentsAsync(OpenApiDocument document)
300300
{
301-
var outputStream = new MemoryStream();
301+
using var outputStream = new MemoryStream();
302302

303303
await document.SerializeAsync(
304304
outputStream,
305305
Version,
306306
Format,
307-
(Writers.OpenApiWriterSettings)new()
307+
new OpenApiWriterSettings()
308308
{
309309
InlineLocalReferences = InlineLocal,
310310
InlineExternalReferences = InlineExternal

0 commit comments

Comments
 (0)