Add a config to set the service/method used for examples
Closed this issue · 0 comments
Currently, README files or other gem-wide documentation sometimes show an "overall" sample, in which we choose one service (and sometimes one method of that service) and show how a call is made. Currently, this selection is made by choosing the "first" service (effectively translating to proto load order) and the "first" method of that service. See, in particular, Gapic::Presenters::GemPresenter#first_non_common_service
. This sometimes results in the choice of an undesirable service (e.g. https://github.com/googleapis/google-cloud-ruby/pull/8413/files#r545941664 switched the service from a primary service to an experimental service.) But it is unclear how to control this, or whether it is even possible/stable.
We should introduce a config/parameter to the generator to allow specification of the service and method name to use for READMEs. (If not present, this can default back to the current behavior.)