From bb3fcfece492e50aff68270abf6c642f8fdb4aee Mon Sep 17 00:00:00 2001 From: Maggiekimani1 Date: Tue, 14 May 2024 17:48:51 +0300 Subject: [PATCH] Fix fragment typo --- src/Microsoft.OpenApi/Models/OpenApiReference.cs | 4 ++-- src/Microsoft.OpenApi/Reader/V3/OpenApiV3VersionService.cs | 2 +- test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.OpenApi/Models/OpenApiReference.cs b/src/Microsoft.OpenApi/Models/OpenApiReference.cs index da69e5004..fd2317803 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiReference.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiReference.cs @@ -62,7 +62,7 @@ public class OpenApiReference : IOpenApiSerializable /// /// Gets a flag indicating whether a file is a valid OpenAPI document or a fragment /// - public bool IsFragrament = false; + public bool IsFragment = false; /// /// The OpenApiDocument that is hosting the OpenApiReference instance. This is used to enable dereferencing the reference. @@ -231,7 +231,7 @@ private string GetExternalReferenceV3() { if (Id != null) { - if (IsFragrament) + if (IsFragment) { return ExternalResource + "#" + Id; } diff --git a/src/Microsoft.OpenApi/Reader/V3/OpenApiV3VersionService.cs b/src/Microsoft.OpenApi/Reader/V3/OpenApiV3VersionService.cs index 789a6b9e5..4479332bd 100644 --- a/src/Microsoft.OpenApi/Reader/V3/OpenApiV3VersionService.cs +++ b/src/Microsoft.OpenApi/Reader/V3/OpenApiV3VersionService.cs @@ -153,7 +153,7 @@ public OpenApiReference ConvertToOpenApiReference( } else { - openApiReference.IsFragrament = true; + openApiReference.IsFragment = true; } openApiReference.ExternalResource = segments[0]; diff --git a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt index a9805b796..7e0730600 100755 --- a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt +++ b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt @@ -887,7 +887,7 @@ namespace Microsoft.OpenApi.Models } public class OpenApiReference : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiSerializable { - public bool IsFragrament; + public bool IsFragment; public OpenApiReference() { } public OpenApiReference(Microsoft.OpenApi.Models.OpenApiReference reference) { } public string Description { get; set; }