You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When converting an instance of McpSchema.TextContent to JSON using Jackson's ObjectMapper, the resulting JSON contains a duplicate "type" field. This is incorrect and could lead to parsing issues or unexpected behavior in systems consuming this JSON.
Steps to Reproduce
Create an instance of McpSchema.TextContent
Serialize it to JSON using Jackson's ObjectMapper
Observe the output contains a duplicate "type" field
The JSON output should have only one "type" field:
{"type":"text","text":"XXX"}
Actual Behavior
The JSON output contains a duplicate "type" field:
{"type":"text","type":"text","text":"XXX"}
Possible Cause
This is likely due to a field and a getter method both being annotated with @JsonProperty("type") in the McpSchema.TextContent class, or the field might be defined twice in the class hierarchy.
Environment
Java version: 21.0.5
Spring AI version: 1.0.0-M6
The text was updated successfully, but these errors were encountered:
Description
When converting an instance of
McpSchema.TextContent
to JSON using Jackson'sObjectMapper
, the resulting JSON contains a duplicate "type" field. This is incorrect and could lead to parsing issues or unexpected behavior in systems consuming this JSON.Steps to Reproduce
McpSchema.TextContent
ObjectMapper
Expected Behavior
The JSON output should have only one "type" field:
Actual Behavior
The JSON output contains a duplicate "type" field:
Possible Cause
This is likely due to a field and a getter method both being annotated with
@JsonProperty("type")
in theMcpSchema.TextContent
class, or the field might be defined twice in the class hierarchy.Environment
The text was updated successfully, but these errors were encountered: