Skip to content

Commit 676af1a

Browse files
docs: improve generation instructions in README.md (#18879)
* docs: improve generation instructions in README.md * clarify location of pip install * normalize indentation (spaces, in line with backticks)
1 parent 6a96c4b commit 676af1a

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,18 +266,31 @@ for how to use credentials with google-http-client and
266266

267267
Generating the API clients requires git and Python 3.6.
268268

269-
1. Install gcp-synthtool:
269+
1. Install the generator dependencies:
270270

271271
```bash
272-
$ python3 -m pip install gcp-synthtool
272+
cd /path/to/google-api-java-client-services/generator
273+
python -m pip install -r generator_requirements.in
273274
```
274275

275276
1. Run the generator:
276277

278+
This is an example for Admin Directory v1. Note that `2.0.0` corresponds to the
279+
latest variant of the generator. Make sure your `discovery-artifact-manager`
280+
[repo](https://github.com/googleapis/discovery-artifact-manager/blob/master/discoveries/admin.directory_v1.json)
281+
is up to date. Output doesn't have to be the exact location of the old
282+
library.
283+
277284
```bash
278-
$ python3 synth.py
285+
python /path/to/google-api-java-client-services/generator/src/googleapis/codegen \
286+
--input=/path/to/discovery-artifact-manager/discoveries/admin.directory_v1.json \
287+
--output_dir=/path/to/google-api-java-client-services/clients/google-api-services-admin/directory_v1/2.0.0 \
288+
--language=java \
289+
--language_variant=2.0.0 \
290+
--package_path=api/services
279291
```
280292
293+
281294
[google-api-java-client]: https://github.com/googleapis/google-api-java-client
282295
[google-auth-library-java]: https://github.com/googleapis/google-auth-library-java
283296
[maven-search]: https://search.maven.org/search?q=google-api-services

0 commit comments

Comments
 (0)