feat: support a2a in apidom (PROVCON-5343)#5182
Conversation
glowcloud
left a comment
There was a problem hiding this comment.
Leaving partial review - apidom-ls is not fully reviewed here. @robert-hebel-sb @cka121 if you find the time, please leave comments in case you don't agree with something.
Additionally for the namespace:
- If possible, could we re-check the tests to see if there are any other fields that are not tested? E.g.
ClientCredentialsOAuthFlowtest doesn’t checkrefreshUrl - We should probably also have the
replace-empty-elementplugin, so that e.g.
name: ‘agent example’
capabilities:Is transformed into
(AgentCardElement
(MemberElement
(StringElement)
(StringElement))
(MemberElement
(StringElement)
(AgentCapabilitiesElement))
And not into
(AgentCardElement
(MemberElement
(StringElement)
(StringElement))
(MemberElement
(StringElement)
(StringElement))
| class AgentCard extends ObjectElement { | ||
| constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) { | ||
| super(content, meta, attributes); | ||
| this.element = 'agentCard'; |
There was a problem hiding this comment.
As this is the root element, should the element name be more specific in terms of mentioning the spec and version? For other specs we use e.g. openApi3_0, asyncApi3, arazzoSpecification1 - maybe for this either agentCard1 or a2aAgentCard1? Or is this too much? @robert-hebel-sb @cka121 what do you think?
There was a problem hiding this comment.
I opt for a2aAgentCard1 even the comment above refers to itRoot element for an A2A Agent Card document
| /** | ||
| * @public | ||
| */ | ||
| class AgentSkill extends ObjectElement { |
There was a problem hiding this comment.
Missing id field https://a2a-protocol.org/latest/specification/#445-agentskill
| /** | ||
| * @public | ||
| */ | ||
| class SecurityRequirementSchemesVisitor extends Mixin(MapVisitor, FallbackVisitor) { |
There was a problem hiding this comment.
Do you think we should move it to security-requirement folder @robert-hebel-sb @cka121 ? 🤔
| ): T => { | ||
| // Canonicalise snake_case keys → camelCase on raw input. Skip if the value | ||
| // is already an ApiDOM Element (caller passed a generic-refracted tree). | ||
| const canonicalised = isElement(value) ? value : canonicalizeKeys(value); |
There was a problem hiding this comment.
The isElement guard here means canonicalizeKeys is never called through the adapter path — which is the primary way documents are parsed.
Both adapters pass the output of parseJSON/parseYAML directly:
const { result } = parseResultElement; // result is already an Element
AgentCardElement.refract(result, refractorOpts);Because isElement(result) === true, canonicalizeKeys is skipped. A document with any protobuf-style snake_case key (default_input_modes, token_url, security_schemes, …) will be refracted with those keys verbatim. FixedFieldsVisitor looks for 'defaultInputModes' in fixedFields, finds 'default_input_modes', misses it, and silently drops the field as an unknown member.
All test fixtures use camelCase, so every test passes today. The bug is invisible until a real protobuf-generated document is parsed.
canonicalizeKeys currently works on plain JS objects — it cannot walk an ApiDOM Element tree because Object.entries(element) would iterate the element's own properties (element, meta, attributes, content), not the document keys. The canonicalization needs to happen before baseRefract, e.g.:
- Option A: Canonicalize the raw string before
parseJSON/parseYAML, or pass a pre-processed plain JS object through a separate code path. - Option B: A post-parse ApiDOM visitor that renames known snake_case
MemberElementkeys to camelCase. This is more idiomatic and preserves the visitor pattern.
Rename root element agentCard -> a2aAgentCard1 to match spec+version convention used by other namespaces (openApi3_0, arazzoSpecification1), incl. namespace registration, predicate, keyMap and snapshots. Remove non-spec `url` field from AgentCard (in A2A v1 the agent URL lives in AgentInterface.url under supportedInterfaces). Fix snake_case canonicalisation: rewrite canonicalizeKeys to walk the generic ApiDOM element tree post-baseRefract instead of the raw JS value, so the parser-adapter path (which passes an already-refracted Element) also gets snake_case -> camelCase normalisation. Previously the isElement guard skipped canonicalisation for every parsed document. Add refractor replace-empty-element plugin (+ export and tests) so empty YAML values are compensated with the appropriate semantic element. Move SecurityRequirementSchemesVisitor into the security-requirement/ folder. Extend element tests to cover previously untested fixed fields (refreshUrl across all OAuth flows, all OAuthFlows/SecurityScheme variants, AgentCard provider/iconUrl/documentationUrl/supportedInterfaces, AgentSkill securityRequirements, AgentInterface tenant, AgentExtension params). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…5343) Rewrite the a2a-json-1 and a2a-yaml-1 parser-adapter READMEs to match the format used by the other adapters (mediaTypes/detect/namespace/parse/usage sections), keeping the structural-detection note specific to A2A. Expand the apidom-reference a2a-json-1 and a2a-yaml-1 parser tests to mirror the coverage of the other parsers (canParse media-type/extension variants, parse from string and buffer, empty file, sourceMap enabled/disabled). Update adapter snapshots for the a2aAgentCard1 element rename. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add required-field lint rules (hasRequiredField) for A2A elements per the spec: AgentCard, AgentSkill, AgentInterface, AgentProvider, AgentCardSignature and all OAuth flow types, with new codes and quick fixes. Add documentation for the A2A element configs that lacked it and wire it into each element's meta. Remove the obsolete AgentCard `url` lint/code/completion entry (the field was removed from the spec) and update the root element config key to a2aAgentCard1. Apply the replace-empty-element plugin on the A2A YAML parsing path in the parser factory. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| // A2A AgentCard documents have no version discriminator field, so we | ||
| // pin the LS namespace identification to A2A v1 (the only published | ||
| // protocol version at time of writing). | ||
| const version = '1.0.0'; |
There was a problem hiding this comment.
do we want to support 1.0.1 as well?
https://github.com/a2aproject/A2A/releases/tag/v1.0.1
There was a problem hiding this comment.
the joys of dealing with a specification that has no consortium and is anti-tooling. this is already going to be a maintenance nightmare, i can see it.
There was a problem hiding this comment.
i'd say that as 1.0.1 has not made it to the official page with a release, we shouldn't need to support it yet: https://a2a-protocol.org/latest/specification/
There was a problem hiding this comment.
there is a working link for 1.0.1 though https://a2a-protocol.org/v1.0.1/specification and latest link already redirects to this version 🤔
There was a problem hiding this comment.
i upgraded us to support 1.0.1. it's only a minor change in a few things, but this version will support 1.0.x.
| tokenUrlLint, | ||
| refreshUrlLint, | ||
| pkceRequiredLint, | ||
| scopesLint, |
There was a problem hiding this comment.
don't we need scopes--required.ts here?
https://a2a-protocol.org/latest/specification/#458-authorizationcodeoauthflow
| import refreshUrlLint from './refresh-url--type.ts'; | ||
| import scopesLint from './scopes--type.ts'; | ||
|
|
||
| const lints = [allowedFieldsLint, tokenUrlRequiredLint, tokenUrlLint, refreshUrlLint, scopesLint]; |
There was a problem hiding this comment.
don't we need scopes--required.ts here?
https://a2a-protocol.org/latest/specification/#459-clientcredentialsoauthflow
| deviceAuthorizationUrlLint, | ||
| tokenUrlLint, | ||
| refreshUrlLint, | ||
| scopesLint, |
There was a problem hiding this comment.
don't we need scopes--required.ts here?
https://a2a-protocol.org/latest/specification/#4510-devicecodeoauthflow
| clientCredentialsOAuthFlow: clientCredentialsOAuthFlowMeta, | ||
| deviceCodeOAuthFlow: deviceCodeOAuthFlowMeta, | ||
| implicitOAuthFlow: implicitOAuthFlowMeta, | ||
| passwordOAuthFlow: passwordOAuthFlowMeta, |
There was a problem hiding this comment.
what about agentExtension, apiKeySecurityScheme, httpAuthSecurityScheme, oauth2SecurityScheme, openIdConnectSecurityScheme, mutualTlsSecurityScheme?
| }, | ||
| { | ||
| target: 'extensions', | ||
| docs: 'Array of [Agent Extension Objects](https://a2a-protocol.org/latest/specification/#agentextension) — protocol extensions supported by the agent.', |
There was a problem hiding this comment.
| docs: 'Array of [Agent Extension Objects](https://a2a-protocol.org/latest/specification/#agentextension) — protocol extensions supported by the agent.', | |
| docs: 'Array of [Agent Extension Objects](https://a2a-protocol.org/latest/specification/#444-agentextension) — protocol extensions supported by the agent.', |
similar for other urls
| // A2A AgentCard documents have no version discriminator field, so we | ||
| // pin the LS namespace identification to A2A v1 (the only published | ||
| // protocol version at time of writing). | ||
| const version = '1.0.0'; |
There was a problem hiding this comment.
there is a working link for 1.0.1 though https://a2a-protocol.org/v1.0.1/specification and latest link already redirects to this version 🤔
| @@ -0,0 +1,3 @@ | |||
| const documentation: never[] = []; | |||
There was a problem hiding this comment.
docs missing (uri, description, required, params):
https://a2a-protocol.org/latest/specification/#444-agentextension
| @@ -0,0 +1,3 @@ | |||
| const documentation: never[] = []; | |||
There was a problem hiding this comment.
docs missing (description, location, name):
https://a2a-protocol.org/latest/specification/#452-apikeysecurityscheme
| @@ -0,0 +1,3 @@ | |||
| const documentation: never[] = []; | |||
There was a problem hiding this comment.
docs missing (description, scheme, bearerFormat)
https://a2a-protocol.org/latest/specification/#453-httpauthsecurityscheme
| @@ -0,0 +1,3 @@ | |||
| const documentation: never[] = []; | |||
There was a problem hiding this comment.
docs missing (description, flows, oauth2MetadataUrl):
https://a2a-protocol.org/latest/specification/#453-httpauthsecurityscheme
| @@ -0,0 +1,3 @@ | |||
| const documentation: never[] = []; | |||
There was a problem hiding this comment.
docs missing (description, openIdConnectUrl):
https://a2a-protocol.org/latest/specification/#455-openidconnectsecurityscheme
| @@ -0,0 +1,3 @@ | |||
| const documentation: never[] = []; | |||
There was a problem hiding this comment.
docs missing (description):
https://a2a-protocol.org/latest/specification/#456-mutualtlssecurityscheme
| @@ -0,0 +1,5 @@ | |||
| import allowedFieldsLint from './allowed-fields.ts'; | |||
|
|
|||
| const lints = [allowedFieldsLint]; | |||
There was a problem hiding this comment.
missing lint rules:
- api-key-security-scheme/lint/location--required.ts
- api-key-security-scheme/lint/name--required.ts
ref: https://a2a-protocol.org/latest/specification/#452-apikeysecurityscheme
| @@ -0,0 +1,5 @@ | |||
| import allowedFieldsLint from './allowed-fields.ts'; | |||
|
|
|||
| const lints = [allowedFieldsLint]; | |||
There was a problem hiding this comment.
missing lint rules:
- http-auth-security-scheme/lint/scheme--required.ts
ref: https://a2a-protocol.org/latest/specification/#453-httpauthsecurityscheme
| @@ -0,0 +1,5 @@ | |||
| import allowedFieldsLint from './allowed-fields.ts'; | |||
|
|
|||
| const lints = [allowedFieldsLint]; | |||
There was a problem hiding this comment.
missing lint rules:
- oauth2-security-scheme/lint/flows--required.ts
ref: https://a2a-protocol.org/latest/specification/#454-oauth2securityscheme
| @@ -0,0 +1,5 @@ | |||
| import allowedFieldsLint from './allowed-fields.ts'; | |||
|
|
|||
| const lints = [allowedFieldsLint]; | |||
There was a problem hiding this comment.
missing lint rule:
- open-id-connect-security-scheme/lint/open-id-connect-url--required.ts
ref: https://a2a-protocol.org/latest/specification/#455-openidconnectsecurityscheme
| documentation, | ||
| }; | ||
|
|
||
| export default meta; |
There was a problem hiding this comment.
this flow is removed in v1.0.0
ref: https://github.com/a2aproject/A2A/blob/main/docs/whats-new-v1.md#oauth-20-security-updates-1303
| documentation, | ||
| }; | ||
|
|
||
| export default meta; |
There was a problem hiding this comment.
this flow was removed in v1.0.0
ref: https://github.com/a2aproject/A2A/blob/main/docs/whats-new-v1.md#oauth-20-security-updates-1303
| }, | ||
| { | ||
| target: 'securityRequirements', | ||
| docs: 'Array of [Security Requirement Objects](https://a2a-protocol.org/latest/specification/#securityrequirement) necessary for this skill.', |
There was a problem hiding this comment.
| docs: 'Array of [Security Requirement Objects](https://a2a-protocol.org/latest/specification/#securityrequirement) necessary for this skill.', | |
| docs: 'Array of [Security Requirement Objects](https://a2a-protocol.org/latest/specification/#451-securityscheme) necessary for this skill.', |
🤔
|
|
||
| /** | ||
| * Hover documentation for A2A v1 AgentCapabilities fields. | ||
| * See [AgentCapabilities](https://a2a-protocol.org/latest/specification/#agentcapabilities). |
There was a problem hiding this comment.
nit:
| * See [AgentCapabilities](https://a2a-protocol.org/latest/specification/#agentcapabilities). | |
| * See [AgentCapabilities](https://a2a-protocol.org/latest/specification/#443-agentcapabilities). |
|
|
||
| /** | ||
| * Hover documentation for A2A v1 AuthorizationCodeOAuthFlow fields. | ||
| * See [AuthorizationCodeOAuthFlow](https://a2a-protocol.org/latest/specification/#authorizationcodeoauthflow). |
There was a problem hiding this comment.
nit:
| * See [AuthorizationCodeOAuthFlow](https://a2a-protocol.org/latest/specification/#authorizationcodeoauthflow). | |
| * See [AuthorizationCodeOAuthFlow](https://a2a-protocol.org/latest/specification/#458-authorizationcodeoauthflow). |
| /** | ||
| * Hover documentation for A2A v1 SecurityScheme fields. SecurityScheme is a | ||
| * discriminated union — exactly one of the subtype fields must be set. | ||
| * See [SecurityScheme](https://a2a-protocol.org/latest/specification/#securityscheme). |
There was a problem hiding this comment.
nit:
| * See [SecurityScheme](https://a2a-protocol.org/latest/specification/#securityscheme). | |
| * See [SecurityScheme](https://a2a-protocol.org/latest/specification/#451-securityscheme). |
| const documentation = [ | ||
| { | ||
| target: 'apiKeySecurityScheme', | ||
| docs: '[API Key Security Scheme](https://a2a-protocol.org/latest/specification/#apikeysecurityscheme) — API key-based authentication. Set this OR exactly one other subtype.', |
There was a problem hiding this comment.
| docs: '[API Key Security Scheme](https://a2a-protocol.org/latest/specification/#apikeysecurityscheme) — API key-based authentication. Set this OR exactly one other subtype.', | |
| docs: '[API Key Security Scheme](https://a2a-protocol.org/latest/specification/#452-apikeysecurityscheme) — API key-based authentication. Set this OR exactly one other subtype.', |
| }, | ||
| { | ||
| target: 'httpAuthSecurityScheme', | ||
| docs: '[HTTP Auth Security Scheme](https://a2a-protocol.org/latest/specification/#httpauthsecurityscheme) — HTTP authentication (Basic, Bearer, etc.). Set this OR exactly one other subtype.', |
There was a problem hiding this comment.
| docs: '[HTTP Auth Security Scheme](https://a2a-protocol.org/latest/specification/#httpauthsecurityscheme) — HTTP authentication (Basic, Bearer, etc.). Set this OR exactly one other subtype.', | |
| docs: '[HTTP Auth Security Scheme](https://a2a-protocol.org/latest/specification/#453-httpauthsecurityscheme) — HTTP authentication (Basic, Bearer, etc.). Set this OR exactly one other subtype.', |
| }, | ||
| { | ||
| target: 'oauth2SecurityScheme', | ||
| docs: '[OAuth2 Security Scheme](https://a2a-protocol.org/latest/specification/#oauth2securityscheme) — OAuth 2.0 authentication. Set this OR exactly one other subtype.', |
There was a problem hiding this comment.
| docs: '[OAuth2 Security Scheme](https://a2a-protocol.org/latest/specification/#oauth2securityscheme) — OAuth 2.0 authentication. Set this OR exactly one other subtype.', | |
| docs: '[OAuth2 Security Scheme](https://a2a-protocol.org/latest/specification/#454-oauth2securityscheme) — OAuth 2.0 authentication. Set this OR exactly one other subtype.', |
| }, | ||
| { | ||
| target: 'openIdConnectSecurityScheme', | ||
| docs: '[OpenID Connect Security Scheme](https://a2a-protocol.org/latest/specification/#openidconnectsecurityscheme) — OpenID Connect authentication. Set this OR exactly one other subtype.', |
There was a problem hiding this comment.
| docs: '[OpenID Connect Security Scheme](https://a2a-protocol.org/latest/specification/#openidconnectsecurityscheme) — OpenID Connect authentication. Set this OR exactly one other subtype.', | |
| docs: '[OpenID Connect Security Scheme](https://a2a-protocol.org/latest/specification/#455-openidconnectsecurityscheme) — OpenID Connect authentication. Set this OR exactly one other subtype.', |
| }, | ||
| { | ||
| target: 'mtlsSecurityScheme', | ||
| docs: '[Mutual TLS Security Scheme](https://a2a-protocol.org/latest/specification/#mutualtlssecurityscheme) — mutual TLS authentication. Set this OR exactly one other subtype.', |
There was a problem hiding this comment.
| docs: '[Mutual TLS Security Scheme](https://a2a-protocol.org/latest/specification/#mutualtlssecurityscheme) — mutual TLS authentication. Set this OR exactly one other subtype.', | |
| docs: '[Mutual TLS Security Scheme](https://a2a-protocol.org/latest/specification/#456-mutualtlssecurityscheme) — mutual TLS authentication. Set this OR exactly one other subtype.', |
| /** | ||
| * Hover documentation for A2A v1 OAuthFlows fields. OAuthFlows must contain | ||
| * exactly one of the flow configurations below. | ||
| * See [OAuthFlows](https://a2a-protocol.org/latest/specification/#oauthflows). |
There was a problem hiding this comment.
nit:
| * See [OAuthFlows](https://a2a-protocol.org/latest/specification/#oauthflows). | |
| * See [OAuthFlows](https://a2a-protocol.org/latest/specification/#457-oauthflows). |
| const documentation = [ | ||
| { | ||
| target: 'authorizationCode', | ||
| docs: '[Authorization Code OAuth Flow](https://a2a-protocol.org/latest/specification/#authorizationcodeoauthflow) — configuration for the OAuth Authorization Code flow.', |
There was a problem hiding this comment.
| docs: '[Authorization Code OAuth Flow](https://a2a-protocol.org/latest/specification/#authorizationcodeoauthflow) — configuration for the OAuth Authorization Code flow.', | |
| docs: '[Authorization Code OAuth Flow](https://a2a-protocol.org/latest/specification/#458-authorizationcodeoauthflow) — configuration for the OAuth Authorization Code flow.', |
| }, | ||
| { | ||
| target: 'clientCredentials', | ||
| docs: '[Client Credentials OAuth Flow](https://a2a-protocol.org/latest/specification/#clientcredentialsoauthflow) — configuration for the OAuth Client Credentials flow.', |
There was a problem hiding this comment.
| docs: '[Client Credentials OAuth Flow](https://a2a-protocol.org/latest/specification/#clientcredentialsoauthflow) — configuration for the OAuth Client Credentials flow.', | |
| docs: '[Client Credentials OAuth Flow](https://a2a-protocol.org/latest/specification/#459-clientcredentialsoauthflow) — configuration for the OAuth Client Credentials flow.', |
| }, | ||
| { | ||
| target: 'deviceCode', | ||
| docs: '[Device Code OAuth Flow](https://a2a-protocol.org/latest/specification/#devicecodeoauthflow) — configuration for the OAuth Device Code flow (RFC 8628).', |
There was a problem hiding this comment.
| docs: '[Device Code OAuth Flow](https://a2a-protocol.org/latest/specification/#devicecodeoauthflow) — configuration for the OAuth Device Code flow (RFC 8628).', | |
| docs: '[Device Code OAuth Flow](https://a2a-protocol.org/latest/specification/#4510-devicecodeoauthflow) — configuration for the OAuth Device Code flow (RFC 8628).', |
| }, | ||
| { | ||
| target: 'implicit', | ||
| docs: '[Implicit OAuth Flow](https://a2a-protocol.org/latest/specification/#implicitoauthflow) — deprecated; use Authorization Code + PKCE instead.', | ||
| targetSpecs: A2A1, | ||
| }, | ||
| { | ||
| target: 'password', | ||
| docs: '[Password OAuth Flow](https://a2a-protocol.org/latest/specification/#passwordoauthflow) — deprecated; use Authorization Code + PKCE or Device Code.', | ||
| targetSpecs: A2A1, | ||
| }, |
There was a problem hiding this comment.
| }, | |
| { | |
| target: 'implicit', | |
| docs: '[Implicit OAuth Flow](https://a2a-protocol.org/latest/specification/#implicitoauthflow) — deprecated; use Authorization Code + PKCE instead.', | |
| targetSpecs: A2A1, | |
| }, | |
| { | |
| target: 'password', | |
| docs: '[Password OAuth Flow](https://a2a-protocol.org/latest/specification/#passwordoauthflow) — deprecated; use Authorization Code + PKCE or Device Code.', | |
| targetSpecs: A2A1, | |
| }, | |
| } | |
| { | |
| target: 'implicit', | |
| docs: '[Implicit OAuth Flow](https://a2a-protocol.org/latest/specification/#implicitoauthflow) — deprecated; use Authorization Code + PKCE instead.', | |
| targetSpecs: A2A1, | |
| }, | |
| { | |
| target: 'password', | |
| docs: '[Password OAuth Flow](https://a2a-protocol.org/latest/specification/#passwordoauthflow) — deprecated; use Authorization Code + PKCE or Device Code.', | |
| targetSpecs: A2A1, | |
| }, |
| @@ -0,0 +1,5 @@ | |||
| import allowedFieldsLint from './allowed-fields.ts'; | |||
|
|
|||
| const lints = [allowedFieldsLint]; | |||
There was a problem hiding this comment.
Missing rules for the types of fields (uri, description, required, params)
| @@ -0,0 +1,5 @@ | |||
| import { ApidomCompletionItem } from '../../../apidom-language-types.ts'; | |||
|
|
|||
| const completion: ApidomCompletionItem[] = []; | |||
| import locationRequiredLint from './location--required.ts'; | ||
| import nameRequiredLint from './name--required.ts'; | ||
|
|
||
| const lints = [allowedFieldsLint, locationRequiredLint, nameRequiredLint]; |
There was a problem hiding this comment.
Missing type linting for fields (location, name, description)
| @@ -0,0 +1,5 @@ | |||
| import { ApidomCompletionItem } from '../../../apidom-language-types.ts'; | |||
|
|
|||
| const completion: ApidomCompletionItem[] = []; | |||
| }, | ||
| { | ||
| target: 'location', | ||
| docs: 'The location of the API key. Valid values are "query", "header", or "cookie" (string, required).', |
There was a problem hiding this comment.
We could add linting to check if the value is one of query, header or cookie, which we do for e.g. in in OAS Parameter. We can probably do this instead of having type lint.
| @@ -0,0 +1,5 @@ | |||
| import { ApidomCompletionItem } from '../../../apidom-language-types.ts'; | |||
|
|
|||
| const completion: ApidomCompletionItem[] = []; | |||
| import allowedFieldsLint from './allowed-fields.ts'; | ||
| import openIdConnectUrlRequiredLint from './open-id-connect-url--required.ts'; | ||
|
|
||
| const lints = [allowedFieldsLint, openIdConnectUrlRequiredLint]; |
There was a problem hiding this comment.
Missing type linting for fields (openIdConnectUrl, description)
| @@ -0,0 +1,5 @@ | |||
| import { ApidomCompletionItem } from '../../../apidom-language-types.ts'; | |||
|
|
|||
| const completion: ApidomCompletionItem[] = []; | |||
| specify('should replace empty skills with a SkillsElement', async function () { | ||
| const yamlDefinition = dedent` | ||
| name: agent example | ||
| skills: |
There was a problem hiding this comment.
Could we instead (or additionally) check values of skills array, which should be SkillElement? E.g. test for:
name: agent
skills:
-| async function () { | ||
| const yamlDefinition = dedent` | ||
| name: agent example | ||
| securitySchemes: |
There was a problem hiding this comment.
Could we instead (or additionally) check values of securitySchemes object, which should be SecuritySchemeElement? E.g. test for:
name: agent example
securitySchemes:
securityScheme1:…extension (PROVCON-5343) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…n (PROVCON-5343) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…OVCON-5343) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…343) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add coverage for type lint rules, completion file checks, discriminated union subtype registration, deprecated object detection, and enum/value-constraint rules — all gaps identified from the A2A 1.0 review comments. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| httpAuthSecurityScheme: httpAuthSecuritySchemeMeta, | ||
| oauth2SecurityScheme: oauth2SecuritySchemeMeta, | ||
| openIdConnectSecurityScheme: openIdConnectSecuritySchemeMeta, | ||
| mutualTlsSecurityScheme: mutualTlsSecuritySchemeMeta, |
There was a problem hiding this comment.
could we add meta for securityRequirement since it's registered in the namespace?
Updates APIDom to support the A2A specification: https://a2a-protocol.org/latest/
Description
Adds new namespace and parser for the A2A specification, fundamentally based on the Arazzo implementation.
Motivation and Context
The A2A specification is a prime candidate for support in the APIDom architecture.
How Has This Been Tested?
Full unit test coverage, and testing via integration with existing architectures.
Screenshots (if appropriate):
Checklist
My PR contains...
src/is unmodified: changes to documentation, CI, metadata, etc.)package.json)My changes...
Documentation
Automated tests