Skip to content

Commit 12292ab

Browse files
authored
fix: when using JsonTypeInfo.DEDUCTION don’t add include (#587)
From the JSonTypeInfo Javadocs: > If deduction is being used annotation properties visible, property and include are ignored. This is causing issues with serialization downstream.
1 parent c1cde20 commit 12292ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

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

0 commit comments

Comments
 (0)