docs(samples): added samples and test for recaptcha key operations#643
Conversation
|
Here is the summary of changes. You are about to add 2 region tags.
This comment is generated by snippet-bot.
|
|
@eaball35 PTAL |
| for (Key key : response.iterateAll()) { | ||
| System.out.println(key.getName()); | ||
| } | ||
| return response; |
There was a problem hiding this comment.
No need to return the response, keep void. https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md#method-structure
There was a problem hiding this comment.
This response is being used in the MigrateKey file. Returning void would mean adding this piece of code to the MigrateKey file (which would be redundant).
Is it okay to treat cases like this as an exception?
There was a problem hiding this comment.
Should avoid returning any value wherever possible, but otherwise fine
| * @param projectId: Google Cloud Project Id. | ||
| * @param recaptchaSiteKey: Specify the site key to migrate. | ||
| */ | ||
| public static void migrateKey(String projectId, String recaptchaSiteKey) throws IOException { |
There was a problem hiding this comment.
Migrate key can't be tested through client libraries as the non-enterprise version of the key needs to be created only through the Admin Console.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #642 ☕️