-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: introduce snippet gen support #483
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
690ed51
to
2e84f2b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preliminary pass with some minor suggestions
tests/Unit/ProtoTests/BasicBidiStreaming/out/samples/BasicBidiStreamingClient/method_bidi.php
Outdated
Show resolved
Hide resolved
tests/Unit/ProtoTests/BasicBidiStreaming/out/samples/BasicBidiStreamingClient/method_bidi.php
Show resolved
Hide resolved
tests/Unit/ProtoTests/BasicBidiStreaming/out/samples/BasicBidiStreamingClient/method_empty.php
Outdated
Show resolved
Hide resolved
...Unit/ProtoTests/BasicServerStreaming/out/samples/BasicServerStreamingClient/method_empty.php
Outdated
Show resolved
Hide resolved
use Google\Cloud\Kms\V1\KeyManagementServiceClient; | ||
|
||
/** | ||
* Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This format is common in protos, but for PHP specifically we may be better off using @see
tags, as I believe it's more idiomatic. Also the proto name (in this case google.cloud.kms.v1.CryptoKey
) is not really relevant.
* Returns metadata for a given {@see CryptoKey}, as
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 - There is a todo here for something like this when possible, https://github.com/googleapis/gapic-generator-php/pull/483/files#diff-6d2583711a56ed5f6ed9262793b7185f0bc017a49a35580b8056429bb2d491fcR161
.../Unit/ProtoTests/Kms/out/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php
Outdated
Show resolved
Hide resolved
1f3b01e
to
355f201
Compare
e698999
to
12e8396
Compare
/cc @amanda-tarafa PTAL :). |
69a83e0
to
772de18
Compare
Co-authored-by: Brent Shaffer <[email protected]>
* has the following format: `projects/{project_id}/regions/{region}` * For | ||
* `projects.locations.autoscalingPolicies.create`, the resource name of the | ||
* location has the following format: `projects/{project_id}/locations/{location}` | ||
* Please see {@see AutoscalingPolicyServiceClient::regionName()} for help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
...ion/goldens/dataproc/samples/V1/AutoscalingPolicyServiceClient/create_autoscaling_policy.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from the point of view of SnippetGen Phase 1 output.
Thanks!!
tests/Integration/goldens/asset/samples/V1/AssetServiceClient/analyze_iam_policy.php
Show resolved
Hide resolved
tests/Integration/goldens/asset/samples/V1/AssetServiceClient/batch_get_assets_history.php
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undoing LGTM, as I just thought to check for two issues that were recently surfaced on all other generators. It's worth it to ship PHP with them fixed.
Thanks!
tests/Integration/goldens/iam/samples/V1/IAMPolicyClient/get_iam_policy.php
Outdated
Show resolved
Hide resolved
tests/Integration/goldens/iam/samples/V1/IAMPolicyClient/get_iam_policy.php
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
No description provided.