Skip to content

Commit

Permalink
Merge pull request GoogleCloudPlatform#1481 from acpana/acpana/fix-docs
Browse files Browse the repository at this point in the history
docs: spell out additions to fixup script
  • Loading branch information
google-oss-prow[bot] authored Apr 1, 2024
2 parents d38750d + 038457d commit b55b320
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 b55b320

Please sign in to comment.