gapic-generator-python icon indicating copy to clipboard operation
gapic-generator-python copied to clipboard

test `x-goog-request-params` over REST

Open vchudnov-g opened this issue 3 years ago • 2 comments

If the new annotation google.api.routing (AIP 4222) is used (example), then I believe we need to include x-goog-request-params, with a value as specified in that annotation, over REST.

If no google.api.routing are presented, then it sounds like we could omit x-goog-request-params because the information would duplicate the URL. UPDATE (2022-10-07): An internal discussion clarified we need to include x-goog-request-params no matter what, even in the REST case.

I'm not sure yet whether the Google use cases make this a P1. More discussion in the internal email thread.

This issue is split off from #1444, which now focuses on the gRPC use case (though that fix will also be relevant to the implementation here).

vchudnov-g avatar Oct 05 '22 23:10 vchudnov-g

We may have the option to use numeric values for the enums. In that case, do we only do it if the numeric enums setting is on? Otherwise, consistent with #1444, we should use the appropriately qualified (fully- or non-) enum value name.

Note that for Compute, we can't use the synthetic numeric values, since the server does not recognize them. The fully qualified value might be confusing to the server. I would guess the non-qualified enum values ought to work.... That said, we don't have a case yet where there's an enum in an http annotation in Compute

vchudnov-g avatar Oct 06 '22 00:10 vchudnov-g

An internal email discussion clarified that we still need to include x-goog-request-params no matter what, even when google.api.routing is absent.

vchudnov-g avatar Oct 07 '22 17:10 vchudnov-g