From d0c20ab2209b3e7ed57cb89dbd4107d915975302 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 10 Jul 2025 09:21:49 -0400 Subject: [PATCH] fix: unconsistent visibility of properties in current keys class --- src/Microsoft.OpenApi/Services/OpenApiWalker.cs | 12 ++++++------ .../PublicApi/PublicApi.approved.txt | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Microsoft.OpenApi/Services/OpenApiWalker.cs b/src/Microsoft.OpenApi/Services/OpenApiWalker.cs index b00bee4de..09a7e5a09 100644 --- a/src/Microsoft.OpenApi/Services/OpenApiWalker.cs +++ b/src/Microsoft.OpenApi/Services/OpenApiWalker.cs @@ -1279,32 +1279,32 @@ public class CurrentKeys /// /// Current Path key /// - public string? Path { get; set; } + public string? Path { get; internal set; } /// /// Current Operation Type /// - public HttpMethod? Operation { get; set; } + public HttpMethod? Operation { get; internal set; } /// /// Current Response Status Code /// - public string? Response { get; set; } + public string? Response { get; internal set; } /// /// Current Content Media Type /// - public string? Content { get; set; } + public string? Content { get; internal set; } /// /// Current Callback Key /// - public string? Callback { get; set; } + public string? Callback { get; internal set; } /// /// Current Link Key /// - public string? Link { get; set; } + public string? Link { get; internal set; } /// /// Current Header Key diff --git a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt index 40e9d307f..cbf19aa59 100644 --- a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt +++ b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt @@ -60,16 +60,16 @@ namespace Microsoft.OpenApi public class CurrentKeys { public CurrentKeys() { } - public string? Callback { get; set; } - public string? Content { get; set; } + public string? Callback { get; } + public string? Content { get; } public string? Encoding { get; } public string? Example { get; } public string? Extension { get; } public string? Header { get; } - public string? Link { get; set; } - public System.Net.Http.HttpMethod? Operation { get; set; } - public string? Path { get; set; } - public string? Response { get; set; } + public string? Link { get; } + public System.Net.Http.HttpMethod? Operation { get; } + public string? Path { get; } + public string? Response { get; } public string? ServerVariable { get; } } [System.AttributeUsage(System.AttributeTargets.Property | System.AttributeTargets.Field)]