Skip to content

Commit b49ab3a

Browse files
sdelamotzolov
authored andcommitted
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.
1 parent 4754565 commit b49ab3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,8 +1064,8 @@ public UnsubscribeRequest(String uri) {
10641064
* The contents of a specific resource or sub-resource.
10651065
*/
10661066
@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION)
1067-
@JsonSubTypes({ @JsonSubTypes.Type(value = TextResourceContents.class, name = "text"),
1068-
@JsonSubTypes.Type(value = BlobResourceContents.class, name = "blob") })
1067+
@JsonSubTypes({ @JsonSubTypes.Type(value = TextResourceContents.class),
1068+
@JsonSubTypes.Type(value = BlobResourceContents.class) })
10691069
public sealed interface ResourceContents extends Meta permits TextResourceContents, BlobResourceContents {
10701070

10711071
/**

0 commit comments

Comments
 (0)