Skip to content

Commit 4e07923

Browse files
committed
Rename class and public method
1 parent b511167 commit 4e07923

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

src/Microsoft.OpenApi/Models/OpenApiDocument.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,9 @@ private static void WriteHostInfoV2(IOpenApiWriter writer, IList<OpenApiServer>
447447
/// <summary>
448448
/// Walks the OpenApiDocument and sets the host document for all IOpenApiReferenceable objects
449449
/// </summary>
450-
public void ResolveHostDocument()
450+
public void SetReferenceHostDocument()
451451
{
452-
var resolver = new HostDocumentResolver(this);
452+
var resolver = new ReferenceHostDocumentSetter(this);
453453
var walker = new OpenApiWalker(resolver);
454454
walker.Walk(this);
455455
}

src/Microsoft.OpenApi/Reader/OpenApiJsonReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public async Task<ReadResult> ReadAsync(JsonNode jsonNode,
9595
}
9696
}
9797

98-
document.ResolveHostDocument();
98+
document.SetReferenceHostDocument();
9999
}
100100
catch (OpenApiException ex)
101101
{

src/Microsoft.OpenApi/Services/HostDocumentResolver.cs renamed to src/Microsoft.OpenApi/Services/ReferenceHostDocumentSetter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
namespace Microsoft.OpenApi.Services
88
{
99
/// <summary>
10-
/// This class is used to walk an OpenApiDocument and sets the host document of OpenApiReferences.
10+
/// This class is used to walk an OpenApiDocument and sets the host document of IOpenApiReferenceable objects
1111
/// </summary>
12-
internal class HostDocumentResolver : OpenApiVisitorBase
12+
internal class ReferenceHostDocumentSetter : OpenApiVisitorBase
1313
{
1414
private readonly OpenApiDocument _currentDocument;
1515

16-
public HostDocumentResolver(OpenApiDocument currentDocument)
16+
public ReferenceHostDocumentSetter(OpenApiDocument currentDocument)
1717
{
1818
_currentDocument = currentDocument;
1919
}

test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,12 +619,12 @@ namespace Microsoft.OpenApi.Models
619619
public System.Collections.Generic.IDictionary<string, Microsoft.OpenApi.Models.OpenApiPathItem> Webhooks { get; set; }
620620
public Microsoft.OpenApi.Services.OpenApiWorkspace Workspace { get; set; }
621621
public Json.Schema.JsonSchema FindSubschema(Json.Pointer.JsonPointer pointer, Json.Schema.EvaluationOptions options) { }
622-
public void ResolveHostDocument() { }
623622
public Json.Schema.JsonSchema ResolveJsonSchemaReference(System.Uri referenceUri) { }
624623
public Microsoft.OpenApi.Interfaces.IOpenApiReferenceable ResolveReference(Microsoft.OpenApi.Models.OpenApiReference reference) { }
625624
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
626625
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
627626
public void SerializeAsV31(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
627+
public void SetReferenceHostDocument() { }
628628
public static string GenerateHashValue(Microsoft.OpenApi.Models.OpenApiDocument doc) { }
629629
public static Microsoft.OpenApi.Reader.ReadResult Load(string url, Microsoft.OpenApi.Reader.OpenApiReaderSettings settings = null) { }
630630
public static Microsoft.OpenApi.Reader.ReadResult Load(System.IO.Stream stream, string format, Microsoft.OpenApi.Reader.OpenApiReaderSettings settings = null) { }

test/Microsoft.OpenApi.Tests/Workspaces/OpenApiWorkspaceTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using System;
55
using System.Collections.Generic;
6-
using System.Linq;
76
using Json.Schema;
87
using Microsoft.OpenApi.Models;
98
using Microsoft.OpenApi.Services;

0 commit comments

Comments
 (0)