From 038457d3f6570e87e5161f3155e798aac0ca7d47 Mon Sep 17 00:00:00 2001 From: Alex Pana <8968914+acpana@users.noreply.github.com> Date: Mon, 1 Apr 2024 19:24:07 +0000 Subject: [PATCH] docs: spell out additions to fixup script Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com> --- mockgcp/README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/mockgcp/README.md b/mockgcp/README.md index 0db177a6a6..9016f41ef1 100644 --- a/mockgcp/README.md +++ b/mockgcp/README.md @@ -32,8 +32,19 @@ Broadly the steps are: refer to your resource's API documentation to identify the service name, for example [privateca](https://cloud.google.com/certificate-authority-service/docs/reference/rest#service:-privateca.googleapis.com). Once you identify the service, find the proper path to the proto files, for example: `cloud/security/privateca/v1/*.proto`. Then replace the prefix `googleapis/google/` to `./third_party/googleapis/mockgcp/`, - and add into the Makefile. If you're adding an API outside of googleapis/google/cloud, - you may need to add commands to rename the API o mockgcp in [fixup-third-party.sh](fixup-third-party.sh] + and add into the Makefile. + +1. (Optional). If you're adding an API outside of googleapis/google/cloud, + you may need to add commands to rename the API o mockgcp in [fixup-third-party.sh](fixup-third-party.sh). Example: + ``` + ... + mv google/logging/ mockgcp/ + ... + find . -type f -print0 | xargs -0 sed -i -e "s@google/logging/@mockgcp/logging/@g" + find . -type f -print0 | xargs -0 sed -i -e "s@google\.logging@mockgcp.logging@g" + ... + ``` + 1. Add a subdirectory called `mock`. Copying one of the existing ones. `mockprivateca` is a reasonable basic one. Keep the files names.go and service.go,