[Bug]: JsonFormat parser fails on standard OpenAPI AgentCard (securityRequirements & securitySchemes)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Java
- Stelle
- 495
- Fork
- 174
- Merge medio
- 1g 11h
- PR unite (30g)
- 48
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di a2aproject/a2a-java
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
a2aproject/a2a-java#1012 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
a2aproject/a2a-java#464 · 1 commento ·
-
sample
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
a2aproject/a2a-java#375 · 5 commenti · 1 assegnatario ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
a2aproject/a2a-java#1175 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
a2aproject/a2a-java#1132 · 5 commenti ·
Tutte le issue di a2aproject/a2a-java
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
HL7/fhir-ig-publisher#1375 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Flaky: a relaunched catch-up replay can still report catching up right after its marker is written Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
johanhaleby/occurrent#1134 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
objectionary/jeo-maven-plugin#1811 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100