Fix: Preserve on_connection_init.response policies when decoding WebBrokerApi xDS bindings
@senthuran16 is already working on this.
Since May 14, 2026.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
Summary
When decoding WebBrokerApi policies from xDS EventChannelResource in event-gateway/gateway-runtime/internal/xdsclient/handler.go, the current implementation treats on_connection_init only as a flat []interface{} and maps all policies into OnConnectionInit.Request. This means any xDS payload using the nested request/response form will silently drop response policies, which can never reach the runtime.
Fix Required
Update toWebBrokerApiBinding (and its per-channel equivalent) to accept both forms:
- If
on_connection_initis amap[string]interface{}withrequestand/orresponsekeys, decode each side separately intoOnConnectionInit.RequestandOnConnectionInit.Response. - Otherwise, fall back to the existing flat-array behavior and populate
Requestfor backward compatibility.
The same fix applies at both the API-level policies block and the per-channel policies block in toWebBrokerApiBinding.
References
- PR: https://github.com/wso2/api-platform/pull/1954
- Review comment: https://github.com/wso2/api-platform/pull/1954#discussion_r3239562654
- Related PR: https://github.com/wso2/api-platform/pull/1944
Requested by
@senthuran16
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.