fix: use POST for SubscribeToTask binding#1891
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the SubscribeToTask RPC in specification/a2a.proto by changing its HTTP method from GET to POST and adding a wildcard body mapping (body: "*") for both the primary and additional bindings. There are no review comments, and I have no feedback to provide.
|
Action: Review all SDKs to see if any actually use GET. If we can convince ourselves that it doesn't break any existing deployments, we should accept this. |
|
JS/Go/Java use POST now |
|
Going backwards in the repo this was a bug ('POST' in specification and 'GET' in the proto) since the methods were introduced in the specification in v0.2.6, we just never noticed: 4cfa452#diff-eebad86dc55e949d1d0630c4a2e92fed2a16b19e0ab623719ed429b5d3eee101R1084 A2A/specification/grpc/a2a.proto Line 71 in 4cfa452 As all the SDKs seem to have standardised on the written spec 'POST', for v1.0 I think we correct this to 'POST', for v0.3 there isn't much we can do. |
Summary
SubscribeToTaskHTTP annotation fromGET /tasks/{id}:subscribetoPOST /tasks/{id}:subscribe.body: "*"to both custom POST bindings so the proto passes the API linter.Changes
SubscribeToTaskREST binding to usepost.SubscribeToTaskREST binding to usepost.body: "*"to both custom POST bindings, matching the API linter requirement for custom POST methods.Why
The protocol documentation already lists Subscribe to task as
POST /tasks/{id}:subscribein the REST method mapping and task operations sections. The proto annotation still usedget, so generated REST bindings could disagree with the published specification.Scope
This only updates the
SubscribeToTaskHTTP binding inspecification/a2a.proto. It does not change the request message shape or any other task operation.Fixes #1819
Fixes: #1574
Verification