Skip to content

Commit b3c048e

Browse files
committed
avoiding changes to types.py
1 parent b134c36 commit b3c048e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/a2a/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,15 +637,15 @@ class JSONRPCRequest(A2ABaseModel):
637637
A unique identifier established by the client. It must be a String, a Number, or null.
638638
The server must reply with the same value in the response. This property is omitted for notifications.
639639
"""
640-
jsonrpc: Literal['2.0']
640+
jsonrpc: Literal['2.0'] = '2.0'
641641
"""
642642
The version of the JSON-RPC protocol. MUST be exactly "2.0".
643643
"""
644644
method: str
645645
"""
646646
A string containing the name of the method to be invoked.
647647
"""
648-
params: Any = None
648+
params: dict[str, Any] | None = None
649649
"""
650650
A structured value holding the parameter values to be used during the method invocation.
651651
"""

tests/server/test_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ def test_invalid_request_structure(client: TestClient):
839839
response = client.post(
840840
'/',
841841
json={
842-
# Missing required fields
842+
'jsonrpc': 'aaaa', # Missing or wrong required fields
843843
'id': '123',
844844
'method': 'foo/bar',
845845
},

0 commit comments

Comments
 (0)