Skip to content

feat: support a2a in apidom (PROVCON-5343)#5182

Open
ben-smartbear wants to merge 15 commits into
mainfrom
feature/provcon-5343--a2a
Open

feat: support a2a in apidom (PROVCON-5343)#5182
ben-smartbear wants to merge 15 commits into
mainfrom
feature/provcon-5343--a2a

Conversation

@ben-smartbear

Copy link
Copy Markdown
Collaborator

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...

  • No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes to a public API (config options, System API, major UI change, etc).
  • are breaking changes to a private API (Redux, component props, utility functions, etc.).
  • are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
  • are not breaking changes.

Documentation

  • My changes do not require a change to the project documentation.
  • My changes require a change to the project documentation.
  • If yes to above: I have updated the documentation accordingly.

Automated tests

  • My changes can not or do not need to be tested.
  • My changes can and should be tested by unit and/or integration tests.
  • If yes to above: I have added tests to cover my changes.
  • If yes to above: I have taken care to cover edge cases in my tests.
  • All new and existing tests passed.

@robert-hebel-sb robert-hebel-sb added the enhancement New feature or request label Jun 3, 2026

@glowcloud glowcloud 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.

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. ClientCredentialsOAuthFlow test doesn’t check refreshUrl
  • We should probably also have the replace-empty-element plugin, 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';

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.

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?

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.

I opt for a2aAgentCard1 even the comment above refers to itRoot element for an A2A Agent Card document

Comment thread packages/apidom-ns-a2a-1/src/elements/AgentCard.ts Outdated
/**
* @public
*/
class AgentSkill extends ObjectElement {

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.

Comment thread packages/apidom-ns-a2a-1/src/elements/OAuth2SecurityScheme.ts
/**
* @public
*/
class SecurityRequirementSchemesVisitor extends Mixin(MapVisitor, FallbackVisitor) {

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.

Do you think we should move it to security-requirement folder @robert-hebel-sb @cka121 ? 🤔

Comment thread packages/apidom-parser-adapter-a2a-yaml-1/README.md Outdated
Comment thread packages/apidom-reference/test/parse/parsers/a2a-json-1/index.ts
Comment thread packages/apidom-reference/test/parse/parsers/a2a-yaml-1/index.ts
Comment thread packages/apidom-ls/src/config/a2a/a2a1/lint/index.ts
Comment thread packages/apidom-ls/src/config/a2a/agent-card-signature/meta.ts
): 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);

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.

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 MemberElement keys to camelCase. This is more idiomatic and preserves the visitor pattern.

ben-smartbear and others added 4 commits June 3, 2026 16:22
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>
Comment thread packages/apidom-ls/src/utils/utils.ts Outdated
// 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';

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.

do we want to support 1.0.1 as well?
https://github.com/a2aproject/A2A/releases/tag/v1.0.1

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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/

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.

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 🤔

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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,

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.

import refreshUrlLint from './refresh-url--type.ts';
import scopesLint from './scopes--type.ts';

const lints = [allowedFieldsLint, tokenUrlRequiredLint, tokenUrlLint, refreshUrlLint, scopesLint];

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.

deviceAuthorizationUrlLint,
tokenUrlLint,
refreshUrlLint,
scopesLint,

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.

clientCredentialsOAuthFlow: clientCredentialsOAuthFlowMeta,
deviceCodeOAuthFlow: deviceCodeOAuthFlowMeta,
implicitOAuthFlow: implicitOAuthFlowMeta,
passwordOAuthFlow: passwordOAuthFlowMeta,

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.

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.',

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.

Suggested change
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

Comment thread packages/apidom-ls/src/utils/utils.ts Outdated
// 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';

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.

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[] = [];

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.

docs missing (uri, description, required, params):
https://a2a-protocol.org/latest/specification/#444-agentextension

@@ -0,0 +1,3 @@
const documentation: never[] = [];

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.

@@ -0,0 +1,3 @@
const documentation: never[] = [];

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.

docs missing (description, scheme, bearerFormat)
https://a2a-protocol.org/latest/specification/#453-httpauthsecurityscheme

@@ -0,0 +1,3 @@
const documentation: never[] = [];

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.

docs missing (description, flows, oauth2MetadataUrl):
https://a2a-protocol.org/latest/specification/#453-httpauthsecurityscheme

@@ -0,0 +1,3 @@
const documentation: never[] = [];

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.

@@ -0,0 +1,3 @@
const documentation: never[] = [];

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.

@@ -0,0 +1,5 @@
import allowedFieldsLint from './allowed-fields.ts';

const lints = [allowedFieldsLint];

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.

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];

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.

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];

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.

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];

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.

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;

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.

documentation,
};

export default meta;

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.

},
{
target: 'securityRequirements',
docs: 'Array of [Security Requirement Objects](https://a2a-protocol.org/latest/specification/#securityrequirement) necessary for this skill.',

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.

Suggested change
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).

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.

nit:

Suggested change
* 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).

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.

nit:

Suggested change
* 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).

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.

nit:

Suggested change
* 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.',

@robert-hebel-sb robert-hebel-sb Jun 9, 2026

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.

Suggested change
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.',

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.

Suggested change
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.',

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.

Suggested change
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.',

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.

Suggested change
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.',

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.

Suggested change
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).

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.

nit:

Suggested change
* 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.',

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.

Suggested change
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.',

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.

Suggested change
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).',

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.

Suggested change
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).',

Comment on lines +23 to +33
},
{
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,
},

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.

Suggested change
},
{
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];

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.

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[] = [];

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.

Missing completion.

import locationRequiredLint from './location--required.ts';
import nameRequiredLint from './name--required.ts';

const lints = [allowedFieldsLint, locationRequiredLint, nameRequiredLint];

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.

Missing type linting for fields (location, name, description)

@@ -0,0 +1,5 @@
import { ApidomCompletionItem } from '../../../apidom-language-types.ts';

const completion: ApidomCompletionItem[] = [];

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.

Missing completion

},
{
target: 'location',
docs: 'The location of the API key. Valid values are "query", "header", or "cookie" (string, required).',

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.

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[] = [];

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.

Missing completion

import allowedFieldsLint from './allowed-fields.ts';
import openIdConnectUrlRequiredLint from './open-id-connect-url--required.ts';

const lints = [allowedFieldsLint, openIdConnectUrlRequiredLint];

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.

Missing type linting for fields (openIdConnectUrl, description)

@@ -0,0 +1,5 @@
import { ApidomCompletionItem } from '../../../apidom-language-types.ts';

const completion: ApidomCompletionItem[] = [];

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.

Missing completion

specify('should replace empty skills with a SkillsElement', async function () {
const yamlDefinition = dedent`
name: agent example
skills:

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.

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:

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.

Could we instead (or additionally) check values of securitySchemes object, which should be SecuritySchemeElement? E.g. test for:

name: agent example
securitySchemes:
  securityScheme1:

ben-smartbear and others added 5 commits June 11, 2026 14:49
…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>
@ben-smartbear ben-smartbear requested a review from glowcloud June 11, 2026 14:23
robert-hebel-sb added a commit that referenced this pull request Jun 12, 2026
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,

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.

could we add meta for securityRequirement since it's registered in the namespace?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants