Skip to content

Commit 2f13479

Browse files
committed
Revert fix to test unit tests
1 parent 53d5829 commit 2f13479

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/a2a/client/client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ async def get_agent_card(
9898
target_url,
9999
agent_card_data,
100100
)
101-
agent_card = AgentCard.model_validate(
102-
agent_card_data, by_alias=True
103-
)
101+
agent_card = AgentCard.model_validate(agent_card_data)
104102
except httpx.HTTPStatusError as e:
105103
raise A2AClientHTTPError(
106104
e.response.status_code,

src/a2a/server/apps/jsonrpc/jsonrpc_app.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,7 @@ async def _handle_get_agent_card(self, request: Request) -> JSONResponse:
375375
# The public agent card is a direct serialization of the agent_card
376376
# provided at initialization.
377377
return JSONResponse(
378-
self.agent_card.model_dump(
379-
exclude_none=True,
380-
by_alias=True,
381-
)
378+
self.agent_card.model_dump(mode='json', exclude_none=True)
382379
)
383380

384381
async def _handle_get_authenticated_extended_agent_card(
@@ -395,8 +392,7 @@ async def _handle_get_authenticated_extended_agent_card(
395392
if self.extended_agent_card:
396393
return JSONResponse(
397394
self.extended_agent_card.model_dump(
398-
exclude_none=True,
399-
by_alias=True,
395+
mode='json', exclude_none=True
400396
)
401397
)
402398
# If supportsAuthenticatedExtendedCard is true, but no specific

0 commit comments

Comments
 (0)