fix remove name when using deduction (#600)

This pull-request removes the name member from the @JsonSubTypes.Type annotations when using JsonTypeInfo.Id.DEDUCTION.

With DEDUCTION, Jackson ignores the name entirely because it's inferring the type from the structure.
This commit is contained in:
Sergio del Amo 2025-10-06 23:00:54 +02:00 • committed by GitHub
commit 94a8b53d88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1064,8 +1064,8 @@ public final class McpSchema {
* The contents of a specific resource or sub-resource. * The contents of a specific resource or sub-resource.
*/ */
@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION) @JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION)
@JsonSubTypes({ @JsonSubTypes.Type(value = TextResourceContents.class, name = "text"), @JsonSubTypes({ @JsonSubTypes.Type(value = TextResourceContents.class),
@JsonSubTypes.Type(value = BlobResourceContents.class, name = "blob") }) @JsonSubTypes.Type(value = BlobResourceContents.class) })
public sealed interface ResourceContents extends Meta permits TextResourceContents, BlobResourceContents { public sealed interface ResourceContents extends Meta permits TextResourceContents, BlobResourceContents {
/** /**