Skip to content

Commit 53093ea

Browse files
authored
Remove obsolete members from AIJsonSchemaCreateOptions (#6432)
1 parent b75358d commit 53093ea

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

src/Libraries/Microsoft.Extensions.AI.Abstractions/Utilities/AIJsonSchemaCreateOptions.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,29 +42,8 @@ public sealed record class AIJsonSchemaCreateOptions
4242
/// </summary>
4343
public AIJsonSchemaTransformOptions? TransformOptions { get; init; }
4444

45-
/// <summary>
46-
/// Gets a value indicating whether to include the type keyword in created schemas for .NET enums.
47-
/// </summary>
48-
[Obsolete("This property has been deprecated.")]
49-
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
50-
public bool IncludeTypeInEnumSchemas { get; init; } = true;
51-
52-
/// <summary>
53-
/// Gets a value indicating whether to generate schemas with the additionalProperties set to false for .NET objects.
54-
/// </summary>
55-
[Obsolete("This property has been deprecated. Use the equivalent property in TransformOptions instead.")]
56-
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
57-
public bool DisallowAdditionalProperties { get; init; }
58-
5945
/// <summary>
6046
/// Gets a value indicating whether to include the $schema keyword in created schemas.
6147
/// </summary>
6248
public bool IncludeSchemaKeyword { get; init; }
63-
64-
/// <summary>
65-
/// Gets a value indicating whether to mark all properties as required in the schema.
66-
/// </summary>
67-
[Obsolete("This property has been deprecated. Use the equivalent property in TransformOptions instead.")]
68-
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
69-
public bool RequireAllProperties { get; init; }
7049
}

test/Libraries/Microsoft.Extensions.AI.Abstractions.Tests/Utilities/AIJsonUtilitiesTests.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
using Microsoft.Extensions.AI.JsonSchemaExporter;
1616
using Xunit;
1717

18-
#pragma warning disable 0618 // Suppress obsolete warnings
19-
2018
namespace Microsoft.Extensions.AI;
2119

2220
public static partial class AIJsonUtilitiesTests
@@ -73,10 +71,7 @@ public static void DefaultOptions_UsesReflectionWhenDefault()
7371
public static void AIJsonSchemaCreateOptions_DefaultInstance_ReturnsExpectedValues(bool useSingleton)
7472
{
7573
AIJsonSchemaCreateOptions options = useSingleton ? AIJsonSchemaCreateOptions.Default : new AIJsonSchemaCreateOptions();
76-
Assert.True(options.IncludeTypeInEnumSchemas);
77-
Assert.False(options.DisallowAdditionalProperties);
7874
Assert.False(options.IncludeSchemaKeyword);
79-
Assert.False(options.RequireAllProperties);
8075
Assert.Null(options.TransformSchemaNode);
8176
Assert.Null(options.TransformOptions);
8277
}

0 commit comments

Comments
 (0)