Allow JsonSerializerOptions parameters for user-defined and inputs and hardcode everything else to the source generator. (#182)
* Allow user-defined JsonSerializerOptions for user-defined and inputs and hardcode everything else to the source generator. * Add validation for user-defined JsonSerializerOptions. * Remove out of date comment. * Address feedback and add tests
This commit is contained in:
parent
4b38d3e71b
commit
f1af251c32
1 changed files with 632 additions and 372 deletions
|
|
@ -289,7 +289,7 @@ public sealed class InMemoryTestSseServer : IAsyncDisposable
|
|||
var jsonRpcResponse = new JsonRpcResponse()
|
||||
{
|
||||
Id = jsonRpcRequest.Id,
|
||||
Result = new InitializeResult()
|
||||
Result = JsonSerializer.SerializeToNode(new InitializeResult
|
||||
{
|
||||
ProtocolVersion = "2024-11-05",
|
||||
Capabilities = new(),
|
||||
|
|
@ -298,7 +298,7 @@ public sealed class InMemoryTestSseServer : IAsyncDisposable
|
|||
Name = "ExampleServer",
|
||||
Version = "1.0.0"
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
// Echo back to the HTTP response
|
||||
|
|
@ -369,7 +369,7 @@ public sealed class InMemoryTestSseServer : IAsyncDisposable
|
|||
{
|
||||
JsonRpc = "2.0",
|
||||
Method = "test/notification",
|
||||
Params = new { message = content }
|
||||
Params = JsonSerializer.SerializeToNode(new { message = content }),
|
||||
};
|
||||
|
||||
var serialized = JsonSerializer.Serialize(notification);
|
||||
|
|
|
|||
Loading…
Reference in a new issue