Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: JsonFormat parser fails on standard OpenAPI AgentCard (securityRequirements & securitySchemes)

オープン
#1,161 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java, openapi
領域
api

調査の方向性

Reproduce the failure with Protobuf's JsonFormat.parser().merge() using a standard OpenAPI AgentCard payload. Inspect the AgentCard, SecurityRequirement, and SecurityScheme definitions and the ProtoUtils.FromProto.agentCard validation; done means standard securityRequirements and securitySchemes deserialize successfully without manual Jackson AST mutation.

索引モデルが issue の本文から書いたものです。

説明

What happened?

When deserializing an OpenAPI-compliant AgentCard JSON payload into org.a2aproject.sdk.grpc.AgentCard using Protobuf's JsonFormat.parser().merge(), two schema mismatch errors occur because the Protobuf definitions expect custom nested message structures instead of standard OpenAPI JSON structures.

Bug 1: securityRequirements Array Mismatch

Issue: OpenAPI specs define security requirements as "bearerAuth": []. In a2a.proto, SecurityRequirement maps schemes as map<string, StringList>, expecting a nested StringList message ({"bearerAuth": {"list": []}}).

Error: com.google.protobuf.InvalidProtocolBufferException: Expect message object but got: [].

Bug 2: securitySchemes Flattened Structure Mismatch

Issue: OpenAPI specs define security scheme parameters at the root level ("scheme": "bearer", "bearerFormat": "API Key"). Protobuf expects these wrapped inside the oneof field http ("http": {"scheme": "bearer", ...}).

Error: InvalidParamsError: SecurityScheme oneof field not set during ProtoUtils.FromProto.agentCard(builder) validation.

Expected Behavior
The SDK should provide an adapter or custom JSON deserializer capable of parsing standard OpenAPI Agent Cards without requiring clients to manually mutate Jackson AST nodes before Protobuf merging.

Environment

SDK Version: Protobuf Java 4.33.1 / SDK org.a2aproject.sdk.grpc

Relevant log output

Code of Conduct
  • I agree to follow this project's Code of Conduct
主要言語
Java
スター
495
フォーク
174
平均マージ
1日 14時間
マージ済み PR(30日)
48

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

a2aproject/a2a-java のほかの issue

a2aproject/a2a-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。