Skip to content

fix: remove /card endpoint from HTTP+JSON binding - #385

Merged
darrelmiller merged 2 commits into
a2aproject:mainfrom
SergeyMenshykh:remove-card-endpoint
May 31, 2026
Merged

darrelmiller merged 2 commits into
a2aproject:mainfrom
SergeyMenshykh:remove-card-endpoint

Conversation

@SergeyMenshykh

Copy link
Copy Markdown
Collaborator

Summary

Remove the GET /card convenience endpoint from MapHttpA2A and the associated agentCard parameter. The endpoint was not part of the A2A specification, and requiring an AgentCard parameter made it impossible to use MapHttpA2A without providing a stub/fake agent card just to satisfy the parameter, even though the endpoint would never be called.

Changes

  • Remove the agentCard parameter from MapHttpA2A.
  • Remove the GET /card route registration from MapHttpA2A.
  • Remove GetAgentCardRestAsync from A2AHttpProcessor.
  • Remove the unnecessary AgentCard DI resolution from the MapA2A overload that used DI-registered services (the resolved card was only needed for the now-removed /card endpoint).

Agent card discovery is still available via MapWellKnownAgentCard or the .well-known/agent-card.json endpoint.

Remove the GET /card convenience endpoint from MapHttpA2A and the
associated agentCard parameter. The endpoint was not part of the A2A
specification, and requiring an AgentCard parameter made it impossible
to use MapHttpA2A without providing a stub/fake agent card just to
satisfy the parameter, even though the endpoint would never be called.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@SergeyMenshykh SergeyMenshykh self-assigned this Apr 20, 2026
@SergeyMenshykh SergeyMenshykh added the .NET Pull requests that update .NET code label Apr 20, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the AgentCard dependency and the /card REST endpoint from the A2A AspNetCore implementation. Key changes include removing AgentCard parameters from MapA2A and MapHttpA2A, and deleting the GetAgentCardRestAsync handler. A review comment suggests adding a null check for the path parameter in MapHttpA2A to prevent potential ArgumentNullException errors if a null value is explicitly passed.

Comment thread src/A2A.AspNetCore/A2AEndpointRouteBuilderExtensions.cs
@SergeyMenshykh SergeyMenshykh added this to the v1.0.0 milestone Apr 20, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@darrelmiller
darrelmiller added this pull request to the merge queue May 31, 2026
Merged via the queue into a2aproject:main with commit bf434ff May 31, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants