Impossible to adhere to AIP suggestions for AIP-136 when using google.api.HttpBody
and have values in request path
#1207
Labels
google.api.HttpBody
and have values in request path
#1207
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: