Conversation
BREAKING CHANGE: Removed the [Obsolete] LegacyTitledEnumSchema API and related Obsoletions constants. The LegacyTitledEnumSchema class used enumNames for titled enums and has been replaced by TitledSingleSelectEnumSchema using oneOf with const/title. JSON with enumNames will now deserialize as UntitledSingleSelectEnumSchema (ignoring enumNames). - Removed LegacyTitledEnumSchema class from ElicitRequestParams.cs - Removed LegacyTitledEnumSchema from JSON converter (deserialization now ignores enumNames) - Removed LegacyTitledEnumSchema from GetDefaultAsJsonElement method - Removed obsoletions constants and added comment that MCP9001 cannot be reused - Removed LegacyTitledEnumSchema tests from EnumSchemaTests.cs - Removed LegacyTitledEnumSchema tests from ElicitationDefaultValuesTests.cs - Removed LegacyTitledEnumSchema tests from PrimitiveSchemaDefinitionTests.cs - Removed LegacyTitledEnumSchema usage from ConformanceTools.cs - Updated documentation in elicitation.md - Updated XML documentation comments to remove references Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>
|
@mikekistler @stephentoub - Do you think it's appropriate to go ahead and remove this? We declared in https://modelcontextprotocol.github.io/csharp-sdk/versioning.html#obsolete-apis, "Within a MAJOR version update, obsolete APIs might be removed." It's our only obsolete API. |
It's still in the spec: /**
* Use TitledSingleSelectEnumSchema instead.
* This interface will be removed in a future version.
*
* @category `elicitation/create`
*/
export interface LegacyTitledEnumSchema {
type: "string";
title?: string;
description?: string;
enum: string[];
/**
* (Legacy) Display names for enum values.
* Non-standard according to JSON schema 2020-12.
*/
enumNames?: string[];
default?: string;
} |
|
I was going to say yes, but then @stephentoub found that it is still in the spec, so I think we should probably keep it -- sadly. |
|
It's also required by the conformance tests: |
|
Keeping this in until it's removed from the spec and conformance tests, meaning first opportunity to delete would be 2.0.0. |
Breaking Change
Removes the deprecated
LegacyTitledEnumSchemaclass from the elicitation API. The legacy schema usedenumNamesfor titled enum options; migrate toTitledSingleSelectEnumSchemawhich usesoneOfwithconst/titleper SEP-1330.Changes
Protocol Changes
LegacyTitledEnumSchemaclass and related converter logicenumNamesproperty now deserializes asUntitledSingleSelectEnumSchema(ignoringenumNames)LegacyTitledEnumSchemafromGetDefaultAsJsonElementswitch expressionDiagnostics
Tests & Documentation
Migration
Before:
After:
Original prompt
Created from Copilot CLI via the copilot delegate command.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.