google-cloud-cpp icon indicating copy to clipboard operation
google-cloud-cpp copied to clipboard

Use first client with a `List*()` operation for quickstart skeleton

Open coryan opened this issue 2 years ago • 2 comments

The scaffold generator runs without any context of the protos in use. We could move the generation of the quickstart skeleton to have access to the service definition. With that information we could generate a correct include file here:

https://github.com/googleapis/google-cloud-cpp/blob/43cd3d9a65df32310bca8d8878ee322d73493a03/generator/internal/scaffold_generator.cc#L938

and maybe pick the first List*() overload consuming a string (with some fallback to "EDIT HERE" if there is none):

https://github.com/googleapis/google-cloud-cpp/blob/43cd3d9a65df32310bca8d8878ee322d73493a03/generator/internal/scaffold_generator.cc#L953

coryan avatar Sep 14 '23 13:09 coryan

Strike one.

scotthart avatar Mar 06 '24 20:03 scotthart

Strike two.

scotthart avatar Sep 11 '24 19:09 scotthart