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)]