Skip to content

Commit f9cd4c4

Browse files
ehsavoieclaude
andcommitted
fix: Correct SecurityScheme and Security JSON format in JSONRPC transport test
Fixed the AGENT_CARD test constant to use the correct protobuf JSON format: - SecurityScheme: Changed from flat structure with "type" discriminator to oneof wrapper format with "openIdConnectSecurityScheme" field - Security: Changed from flat map structure to nested structure with "schemes" wrapper and "list" wrapper for scopes This ensures the JSON matches the protobuf JSON format expected by JSONRPCUtils.parseJsonString() in the JSONRPC transport layer. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent d7ae3f1 commit f9cd4c4

File tree

1 file changed

+17
-13
lines changed
  • client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc

1 file changed

+17
-13
lines changed

client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonMessages.java

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ public class JsonMessages {
3030
},
3131
"securitySchemes": {
3232
"google": {
33-
"type": "openIdConnect",
34-
"openIdConnectUrl": "https://accounts.google.com/.well-known/openid-configuration"
33+
"openIdConnectSecurityScheme": {
34+
"openIdConnectUrl": "https://accounts.google.com/.well-known/openid-configuration"
35+
}
3536
}
3637
},
37-
"security": [{ "google": ["openid", "profile", "email"] }],
38+
"security": [{ "schemes": { "google": { "list": ["openid", "profile", "email"] } } }],
3839
"defaultInputModes": ["application/json", "text/plain"],
3940
"defaultOutputModes": ["application/json", "image/png"],
4041
"skills": [
@@ -102,11 +103,12 @@ public class JsonMessages {
102103
},
103104
"securitySchemes": {
104105
"google": {
105-
"type": "openIdConnect",
106-
"openIdConnectUrl": "https://accounts.google.com/.well-known/openid-configuration"
106+
"openIdConnectSecurityScheme": {
107+
"openIdConnectUrl": "https://accounts.google.com/.well-known/openid-configuration"
108+
}
107109
}
108110
},
109-
"security": [{ "google": ["openid", "profile", "email"] }],
111+
"security": [{ "schemes": { "google": { "list": ["openid", "profile", "email"] } } }],
110112
"defaultInputModes": ["application/json", "text/plain"],
111113
"defaultOutputModes": ["application/json", "image/png"],
112114
"skills": [
@@ -677,11 +679,12 @@ public class JsonMessages {
677679
},
678680
"securitySchemes": {
679681
"google": {
680-
"type": "openIdConnect",
681-
"openIdConnectUrl": "https://accounts.google.com/.well-known/openid-configuration"
682+
"openIdConnectSecurityScheme": {
683+
"openIdConnectUrl": "https://accounts.google.com/.well-known/openid-configuration"
684+
}
682685
}
683686
},
684-
"security": [{ "google": ["openid", "profile", "email"] }],
687+
"security": [{ "schemes": { "google": { "list": ["openid", "profile", "email"] } } }],
685688
"defaultInputModes": ["application/json", "text/plain"],
686689
"defaultOutputModes": ["application/json", "image/png"],
687690
"skills": [
@@ -757,11 +760,12 @@ public class JsonMessages {
757760
},
758761
"securitySchemes": {
759762
"google": {
760-
"type": "openIdConnect",
761-
"openIdConnectUrl": "https://accounts.google.com/.well-known/openid-configuration"
763+
"openIdConnectSecurityScheme": {
764+
"openIdConnectUrl": "https://accounts.google.com/.well-known/openid-configuration"
765+
}
762766
}
763767
},
764-
"security": [{ "google": ["openid", "profile", "email"] }],
768+
"security": [{ "schemes": { "google": { "list": ["openid", "profile", "email"] } } }],
765769
"defaultInputModes": ["application/json", "text/plain"],
766770
"defaultOutputModes": ["application/json", "image/png"],
767771
"skills": [
@@ -800,6 +804,6 @@ public class JsonMessages {
800804
}
801805
],
802806
"supportsAuthenticatedExtendedCard": true,
803-
"protocolVersion": "0.2.5"
807+
"protocolVersion": "0.4.0"
804808
}""";
805809
}

0 commit comments

Comments
 (0)