Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/images/workbench.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/Microsoft.OpenApi.Workbench/MainModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Reader;
using Microsoft.OpenApi.Readers;
using Microsoft.OpenApi.Services;
using Microsoft.OpenApi.Validations;
using Microsoft.OpenApi.Writers;

namespace Microsoft.OpenApi.Workbench
{
Expand Down Expand Up @@ -242,7 +242,7 @@ internal async Task ParseDocumentAsync()
: new("file://" + Path.GetDirectoryName(_inputFile) + "/");
}

var readResult = await OpenApiDocument.LoadAsync(stream, Format.GetDisplayName());
var readResult = await OpenApiDocument.LoadAsync(stream, Format.GetDisplayName().ToLowerInvariant(), settings);
var document = readResult.Document;
var context = readResult.Diagnostic;

Expand Down Expand Up @@ -298,13 +298,13 @@ internal async Task ParseDocumentAsync()
/// </summary>
private async Task<string> WriteContentsAsync(OpenApiDocument document)
{
var outputStream = new MemoryStream();
using var outputStream = new MemoryStream();

await document.SerializeAsync(
outputStream,
Version,
Format,
(Writers.OpenApiWriterSettings)new()
new OpenApiWriterSettings()
{
InlineLocalReferences = InlineLocal,
InlineExternalReferences = InlineExternal
Expand Down