Skip to content

Add A2A API round-trip support in extract/publish and all-types integration coverage#89

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/add-support-for-a2a-scenarios
Draft

Add A2A API round-trip support in extract/publish and all-types integration coverage#89
Copilot wants to merge 2 commits into
mainfrom
copilot/add-support-for-a2a-scenarios

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 29, 2026

This PR adds first-class handling for APIM Agent-to-Agent (A2A) APIs so apiops extract -> apiops publish can round-trip A2A artifacts without degrading A2A-specific behavior. It also extends the all-types integration scenario to include an A2A API with JSON-RPC and agent card settings.

  • A2A behavior in extract/publish

    • extract now treats type: a2a as a no-spec API type (same class of behavior as websocket/mcp for spec export), avoiding OpenAPI export attempts for A2A endpoints.
    • publish now skips spec-import field injection for A2A APIs, preserving A2A API payload semantics instead of forcing OpenAPI import paths.
  • Client export-format mapping

    • APIM client export format resolution now explicitly short-circuits for a2a, preventing unnecessary export calls for API types that do not use spec artifacts.
  • Integration round-trip expansion (all-resource-types)

    • Added src-a2a-weather-agent to source-apim.bicep with:
      • type: 'a2a'
      • agent.id
      • a2aProperties (agent card path/backend URL)
      • jsonRpcProperties (runtime backend/path)
      • subscription key requirements
    • Updated expected extraction structure and protocol inventory docs to assert A2A artifacts and key fields.
  • Unit coverage for A2A paths

    • Added focused tests to verify:
      • A2A skips spec export in extractor flow
      • A2A skips APIM spec fetch in client flow
      • A2A publish path does not inject spec import fields
properties: any({
  type: 'a2a'
  agent: { id: 'src-a2a-weather-agent' }
  a2aProperties: {
    agentCardPath: '/.well-known/agent.json'
    agentCardBackendUrl: 'https://src-a2a-weather-agent.example.com/.well-known/agent.json'
  }
  jsonRpcProperties: {
    backendUrl: 'https://src-a2a-weather-agent.example.com'
    path: '/'
  }
})

Copilot AI linked an issue May 29, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add support for Agent-to-Agent APIs in apiops extract and publish Add A2A API round-trip support in extract/publish and all-types integration coverage May 29, 2026
Copilot finished work on behalf of EMaher May 29, 2026 04:37
Copilot AI requested a review from EMaher May 29, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for A2A scenarios

2 participants