googleapis/gapic-generator-go

future: have generic handler or service namespaces operation wrappers

codyoss opened this issue · 1 comments

Although this is unlikely as we have seen in some recent PRs collisions can happen. We should design around this in the future if we are going to take a v2. ExampleL: #1398

As way of helping improve the debugging/error reporting and reduce issues where there might not be one, we can actually share operation wrapper types when the following things are true between two RPCs with the same name:

  • the RPC simple names are the same e.g. CreateFoo
  • the response_type is the same
  • the metadata_type is the same

This will make the generation logic work for situations like #1398 while also enabling the generator to report specific collisions in the even that some, but not all of those conditions are true such that they result in a collision.