[Bug]: JsonFormat parser fails on standard OpenAPI AgentCard (securityRequirements & securitySchemes)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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
- 星标
- 505
- 派生
- 185
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 25
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
a2aproject/a2a-java 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
a2aproject/a2a-java#1233 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
a2aproject/a2a-java#1012 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
a2aproject/a2a-java#464 · 1 条评论 ·
维护者通常 1 天内回复
-
Create a sample that demonstrates how to use a shared contextId across multiple tasks可能重新可做 @tanish111 于 362 天前认领,目前没有进行中的 PR。 未关闭sample
难度 2/5 1-3 小时 新手友好度 70/100
a2aproject/a2a-java#375 · 5 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Bug]: Blocking message/send loses the final event when the agent emits an event before completing可能已有人在做 @jeroenbellen 于 3 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
a2aproject/a2a-java#1226 ·
维护者通常 1 天内回复
查看 a2aproject/a2a-java 的全部 Issue
相似的 Issue
-
pdfium-drift
难度 1/5 1 小时以内 新手友好度 82/100
Stirling-Tools/JPDFium#176 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
hiero-ledger/hiero-consensus-node#27712 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 61/100
Vakore/ZappierGames#162 ·
-
Improve README documentation clarity and fix minor wording issues可能已有人在做 @simplesilence 今天认领。 未关闭
难度 1/5 1-3 小时 新手友好度 84/100
resilience4j/resilience4j#2567 ·
维护者通常 6 天内回复
-
Priority/High
难度 2/5 1-3 小时 新手友好度 65/100
wso2/dpdp-accelerator#417 ·
维护者通常 1 天内回复