Skip to content

Commit a271e68

Browse files
Modernize JsonSchema.Deprecated storage
Use the C# 14 field keyword while preserving mutable-schema validation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 69ae6b80-f573-41bd-8cf9-e0f858510bbe
1 parent 43560bc commit a271e68

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • src/libraries/System.Text.Json/src/System/Text/Json/Schema

src/libraries/System.Text.Json/src/System/Text/Json/Schema/JsonSchema.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ public JsonSchema() { }
7979

8080
public int? MaxLength { get; set { VerifyMutable(); field = value; } }
8181

82-
public bool? Deprecated { get => _deprecated; set { VerifyMutable(); _deprecated = value; } }
83-
private bool? _deprecated;
82+
public bool? Deprecated { get; set { VerifyMutable(); field = value; } }
8483

8584
public JsonSchemaExporterContext? ExporterContext { get; set; }
8685

0 commit comments

Comments
 (0)