Skip to content

Commit

Permalink
docs: spell out additions to fixup script
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Pana <[email protected]>
  • Loading branch information
acpana committed Apr 1, 2024
1 parent 22bfdf2 commit 038457d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions mockgcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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\[email protected]@g"
...
```

1. Add a subdirectory called `mock<servicename>`.

Copying one of the existing ones. `mockprivateca` is a reasonable basic one. Keep the files names.go and service.go,
Expand Down

0 comments on commit 038457d

Please sign in to comment.