gRPC JsonTranscoding: query string parameter from a `oneof` sibling clears a route-bound field
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
## Description
When a protobuf request message uses a `oneof` group and one member is bound from the HTTP route, supplying a different member of the same `oneof` via the query string silently clears the route-bound value.
**Steps to reproduce**
1. Define a request message with a `oneof`:
```proto
message GetUserRequest {
oneof identifier {
string user_id = 1;
string email = 2;
}
}
```
2. Add an HTTP rule binding one member to the route:
```
GET /users/{user_id}
```
3. Send a request with a sibling field in the query string:
```
GET /users/alice?email=other@example.com
```
**Expected:** `user_id = "alice"`, `email` query param ignored.
**Actual:** `user_id` is cleared, handler receives `user_id = ""`, `email = "other@example.com"`.
Contributor guide
Research direction
Start by reproducing the gRPC JsonTranscoding request-binding behavior with the protobuf oneof and HTTP route shown in the issue, then trace how route-bound and query-string fields reach the handler. Done means a query parameter for a sibling oneof member is ignored and the route-bound field remains "alice".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, grpc
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 64/100