feat: api_dump template to use in tests#845
Conversation
| @@ -0,0 +1,14065 @@ | |||
| { | |||
| "packageName": "google", | |||
There was a problem hiding this comment.
This is the problem I will fix in the following PR: the package name must be google.pubsub but is detected incorrectly.
| @@ -0,0 +1 @@ | |||
| {{ api.dump | safe }} | |||
There was a problem hiding this comment.
This is the new template being added for test purposes. Running the generator with --template=api_dump will produce the above JSON representation, which will help debugging weird problems.
| ); | ||
| } | ||
|
|
||
| get dump() { |
There was a problem hiding this comment.
This is a new getter to produce an API dump.
There was a problem hiding this comment.
Just to clarify, it will be only used in tests or during debugging. We won't dump this thing for regular libraries.
| @@ -1,4 +1,4 @@ | |||
| // Copyright 2021 Google LLC | |||
There was a problem hiding this comment.
This is a little strange that it changes the date?
There was a problem hiding this comment.
The original protos are (c) 2020 and apparently someone changed everything to 2021 even though this particular change was not needed.
🤖 I have created a release \*beep\* \*boop\* --- ## [1.3.0](https://www.github.com/googleapis/gapic-generator-typescript/compare/v1.2.11...v1.3.0) (2021-04-28) ### Features * api_dump template to use in tests ([#845](https://www.github.com/googleapis/gapic-generator-typescript/issues/845)) ([71f3ed0](https://www.github.com/googleapis/gapic-generator-typescript/commit/71f3ed045b9d3456b10a5539fd998d445acdb97d)) ### Bug Fixes * **deps:** update all packages (major), do not use get-stdin ([#855](https://www.github.com/googleapis/gapic-generator-typescript/issues/855)) ([07e645a](https://www.github.com/googleapis/gapic-generator-typescript/commit/07e645aa81e5df1e7582e6940ef911d98c1409a2)) * name generation when multiple packages are involved ([#847](https://www.github.com/googleapis/gapic-generator-typescript/issues/847)) ([9ab2a61](https://www.github.com/googleapis/gapic-generator-typescript/commit/9ab2a615be761a97d44dd6ed775cbce3842bced7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Before fixing the naming issue for Pub/Sub, adding some test coverage.
The generator now has a template called
api_dumpwhich just dumps the JSON representation of the API metadata being generated. As you can see, the package name for the Pub/Sub API is currently generated asgoogleand notgoogle.pubsub, which is the source of the Pub/Sub problems, and it will be fixed in the following PR.Please ignore the copyright year changes in the baseline protos.