@@ -215,29 +215,30 @@ void testEmbeddedResourceWithBlobContentsDeserialization() throws Exception {
215
215
@ Test
216
216
void testResourceLink () throws Exception {
217
217
McpSchema .ResourceLink resourceLink = new McpSchema .ResourceLink ("main.rs" , "file:///project/src/main.rs" ,
218
- "Primary application entry point" , "text/x-rust" , null , null );
218
+ "Primary application entry point" , "text/x-rust" , null , null , Map . of ( "metaKey" , "metaValue" ) );
219
219
String value = mapper .writeValueAsString (resourceLink );
220
220
221
221
assertThatJson (value ).when (Option .IGNORING_ARRAY_ORDER )
222
222
.when (Option .IGNORING_EXTRA_ARRAY_ITEMS )
223
223
.isObject ()
224
224
.isEqualTo (
225
225
json ("""
226
- {"type":"resource_link","name":"main.rs","uri":"file:///project/src/main.rs","description":"Primary application entry point","mimeType":"text/x-rust"}""" ));
226
+ {"type":"resource_link","name":"main.rs","uri":"file:///project/src/main.rs","description":"Primary application entry point","mimeType":"text/x-rust","_meta":{"metaKey":"metaValue"} }""" ));
227
227
}
228
228
229
229
@ Test
230
230
void testResourceLinkDeserialization () throws Exception {
231
231
McpSchema .ResourceLink resourceLink = mapper .readValue (
232
232
"""
233
- {"type":"resource_link","name":"main.rs","uri":"file:///project/src/main.rs","description":"Primary application entry point","mimeType":"text/x-rust"}""" ,
233
+ {"type":"resource_link","name":"main.rs","uri":"file:///project/src/main.rs","description":"Primary application entry point","mimeType":"text/x-rust","_meta":{"metaKey":"metaValue"} }""" ,
234
234
McpSchema .ResourceLink .class );
235
235
assertThat (resourceLink ).isNotNull ();
236
236
assertThat (resourceLink .type ()).isEqualTo ("resource_link" );
237
237
assertThat (resourceLink .name ()).isEqualTo ("main.rs" );
238
238
assertThat (resourceLink .uri ()).isEqualTo ("file:///project/src/main.rs" );
239
239
assertThat (resourceLink .description ()).isEqualTo ("Primary application entry point" );
240
240
assertThat (resourceLink .mimeType ()).isEqualTo ("text/x-rust" );
241
+ assertThat (resourceLink .meta ()).containsEntry ("metaKey" , "metaValue" );
241
242
}
242
243
243
244
// JSON-RPC Message Types Tests
@@ -1366,7 +1367,7 @@ void testProgressNotificationWithMessage() throws Exception {
1366
1367
.isObject ()
1367
1368
.isEqualTo (
1368
1369
json ("""
1369
- {"progressToken":"progress-token-123","progress":0.5,"total":1.0,"message":"Processing file 1 of 2"} ,"_meta":{"key":"value"}""" ));
1370
+ {"progressToken":"progress-token-123","progress":0.5,"total":1.0,"message":"Processing file 1 of 2","_meta":{"key":"value"} }""" ));
1370
1371
}
1371
1372
1372
1373
@ Test
0 commit comments