Make the generator always generate legacy and multi path templates #1579
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Context: googleapis/google-cloud-node#5289
There is a known breaking change in the generator that when an API specifies multiple pattern types, after only having one, the generator only generates paths for the new ones, and not the old ones.
A possible fix is to always generate the legacy naming, even if new patterns are introduced. So, in this example, we'd always generate
secretVersionPathTemplate
and the new multipattern ones too.This is where the paths get rendered:
gapic-generator-typescript/templates/cjs/typescript_gapic/src/$version/$service_client.ts.njk
Line 1008 in 7cfda61
And the logic is actually set here:
gapic-generator-typescript/typescript/src/schema/resource-database.ts
Line 68 in 7cfda61
We'd need to make sure both branches are executed, i.e., regardless of whether there are multipatterns, we should also generate a legacy pattern as well.
The text was updated successfully, but these errors were encountered: