79392278

Date: 2025-01-27 22:08:53
Score: 1
Natty:
Report link

Ok I found my answer after digging through some old issues in GRPC-Gateway Github. This issue called out a similar situation to mine. Once it was added it pointed to the correct spot in the documentation: https://github.com/grpc-ecosystem/grpc-gateway/issues/707

https://cloud.google.com/service-infrastructure/docs/service-management/reference/rpc/google.api#httprule

Under special notes https://cloud.google.com/service-infrastructure/docs/service-management/reference/rpc/google.api#special-notes I found the field for responseBody

In my RPC definition, I was able to add a responseBody field which pulls out my array to the top level JSON:

option (google.api.http) = {
      get: "/test/v1/test"
      response_body: "example"
    };

This then left me with the JSON I needed.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Kyle