The transcoder currently treats the whole request body as the message and overlays path params. It ignores several core google.api.http mapping rules, which breaks drop-in compatibility with grpc-gateway / Envoy transcoder.
Gaps to close (Tier 0 — core correctness)
- Query-parameter binding — fields not bound by the path or body must be populated from the query string, coerced to the field's proto type (scalars, repeated → array, dotted nested paths). Today a
GET /v1/x?limit=10 drops limit.
body mapping — honor the rule's body: "*" (whole body → message root, current implicit behavior), "field" (body → that subfield), or empty (no body; fields from path+query only, e.g. GET/DELETE).
response_body — when set, return that subfield of the response message as the HTTP body instead of the whole message.
additional_bindings — register every additional (method, path, body) binding for the same RPC, not just the primary one.
Approach
- Enrich the parsed HTTP rule into a list of bindings, each carrying method, path, body mapping, and response_body.
- Factor request-message construction into pure, unit-tested helpers (body mapping + path + query overlay with proto-type coercion).
- Extract
response_body subfield on the unary response path.
- Keep gRPC, streaming, CORS, health, etc. unchanged.
Acceptance
- Unit tests for: body mapping (
*/field/none), query coercion per kind, repeated + dotted query, response_body extraction.
- Router builds with additional_bindings without panic; each binding routes.
Estimate: 1d
The transcoder currently treats the whole request body as the message and overlays path params. It ignores several core
google.api.httpmapping rules, which breaks drop-in compatibility with grpc-gateway / Envoy transcoder.Gaps to close (Tier 0 — core correctness)
GET /v1/x?limit=10dropslimit.bodymapping — honor the rule'sbody:"*"(whole body → message root, current implicit behavior),"field"(body → that subfield), or empty (no body; fields from path+query only, e.g. GET/DELETE).response_body— when set, return that subfield of the response message as the HTTP body instead of the whole message.additional_bindings— register every additional (method, path, body) binding for the same RPC, not just the primary one.Approach
response_bodysubfield on the unary response path.Acceptance
*/field/none), query coercion per kind, repeated + dotted query, response_body extraction.Estimate: 1d