Skip to content

Commit 7c5870f

Browse files
committed
PR feedback: remove unnecessary variable
1 parent 962d6fa commit 7c5870f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,9 @@ private static async Task<ReadResult> InternalLoadAsync(Stream input, string for
264264

265265
private static async Task<OpenApiDiagnostic> LoadExternalRefsAsync(OpenApiDocument document, OpenApiReaderSettings settings, string format = null, CancellationToken token = default)
266266
{
267-
// Create workspace for all documents to live in.
268-
var baseUrl = document.BaseUri;
269-
var openApiWorkSpace = document.Workspace;
270-
271-
// Load this root document into the workspace
267+
// Load this document into the workspace
272268
var streamLoader = new DefaultStreamLoader(settings.HttpClient);
273-
var workspaceLoader = new OpenApiWorkspaceLoader(openApiWorkSpace, settings.CustomExternalLoader ?? streamLoader, settings);
269+
var workspaceLoader = new OpenApiWorkspaceLoader(document.Workspace, settings.CustomExternalLoader ?? streamLoader, settings);
274270
return await workspaceLoader.LoadAsync(new OpenApiReference() { ExternalResource = "/" }, document, format ?? OpenApiConstants.Json, null, token).ConfigureAwait(false);
275271
}
276272

0 commit comments

Comments
 (0)