Skip to content

Commit cd8f7ae

Browse files
Merge main branch and resolve conflicts
Co-authored-by: eiriktsarpalis <[email protected]>
1 parent d826cd3 commit cd8f7ae

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

src/ModelContextProtocol.AspNetCore/StreamableHttpHandler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ private static Task WriteJsonRpcErrorAsync(HttpContext context, string errorMess
250250
{
251251
var jsonRpcError = new JsonRpcError
252252
{
253-
Id = default,
254253
Error = new()
255254
{
256255
Code = errorCode,

src/ModelContextProtocol.Core/Protocol/JsonRpcMessageWithId.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ private protected JsonRpcMessageWithId()
2626
/// Each ID is expected to be unique within the context of a given session.
2727
/// </remarks>
2828
[JsonPropertyName("id")]
29-
public required RequestId Id { get; set; }
29+
public RequestId Id { get; set; }
3030
}

tests/ModelContextProtocol.AspNetCore.Tests/StatelessServerTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ public static async Task<string> TestSamplingErrors(McpServer server)
203203

204204
var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendRequestAsync(new JsonRpcRequest
205205
{
206-
Id = default,
207206
Method = RequestMethods.SamplingCreateMessage
208207
}));
209208
return ex.Message;
@@ -222,7 +221,6 @@ public static async Task<string> TestRootsErrors(McpServer server)
222221

223222
var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendRequestAsync(new JsonRpcRequest
224223
{
225-
Id = default,
226224
Method = RequestMethods.RootsList
227225
}));
228226
return ex.Message;
@@ -241,7 +239,6 @@ public static async Task<string> TestElicitationErrors(McpServer server)
241239

242240
var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendRequestAsync(new JsonRpcRequest
243241
{
244-
Id = default,
245242
Method = RequestMethods.ElicitationCreate
246243
}));
247244
return ex.Message;

0 commit comments

Comments
 (0)