Request message eliding doesn't respect `@OutputOnly` fields
- Dominant language
- Python
- Stars
- 157
- Forks
- 131
- PR merge metrics
- No merged PRs in 30d
Description
A method that takes a path parameter called "foo" and a request body with a field called "foo" has the request message and path parameter elided, assuming that the value of "foo" specified in the request body will be the same one that should be specified in the path.
This ignores the case where the "foo" field in the request body is marked as `@OutputOnly`, where it's not valid to pass the value in the request body.
`--unelidable_request_methods` can specify that the message should not be elided, but ideally the eliding logic would skip eliding messages when `@OutputOnly` is involved.
I believe the necessary change is somewhere in `_NeedRequestType` [here](https://github.com/google/apitools/blob/b780937b9e0e4ddcf249d36ed49c86af8420257b/apitools/gen/service_registry.py#L294).
Contributor guide
Assessment
This issue has not been assessed yet.