-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impossible to adhere to AIP suggestions for AIP-136 when using google.api.HttpBody
and have values in request path
#1207
Comments
great one @achew22, same here |
@loeffel-io @achew22 so the ask is to specifically allow a non- If so, I actually made this change internally and just haven't ported it to the OSS version (oops). LMK and I can make that change no problem |
@noahdietz, if you have a modification that could be brought into the oss repo it would be greatly appreciated! As a rule I don't care what the linter says as long as it is consistent, which I expect this would be. Thank you in advance! |
Right-o, just opened #1444 ! |
Merged, will cut a release on Monday |
This should now be available in v1.67.6 |
Thank you @noahdietz 🙏 |
In AIP-136, and in the associated linter entry it is suggested that the following would not be allowed:
I believe the implied form of
CheckoutBookRequest
would be something like:This seems reasonable in the general case. There is, however, an edge case in the somewhat bizarre event where you're using
google.api.HttpBody
to provide a webhook endpoint where you can't control the caller to send you structured data. Unfortunately I can't even force JSON, I'm going to be gettingapplication/x-www-form-urlencoded
encoded data posted as the whole body. I could put it into abody: "string_field"
directly, but then I would be asking the parser to infer the encoding, which feels unnecessary since there is a nice way to get thecontent_type
. I believe this functionally is akin toHTTPOverRPC
from days of old (sorry for bringing that up if you remember it). This may be considered a thing that is beyond the scope for AIP, but I believe the only correct form for using this would be:Unfortunately this causes a lint error. I could then add a lint exception for
api-linter: core::0136::http-body=disabled
to theHandleWebhook
RPC, but I want to make sure that I'm not missing something obvious.Is this what you would expect?
The text was updated successfully, but these errors were encountered: