summaryrefslogtreecommitdiff
path: root/README
blob: a09513a4c54ec665fb9eb664394fc9cb1b442f2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
ALIBABA CLOUD API METADATA
==========================

INTRODUCTION
------------
This repository provides scripts that generate and maintain Alibaba Cloud
API metadata from the OpenMeta service for API documentation and SDK
generation.


BUILD
-----
Metadata is updated regularly to reflect the latest API changes. It is
maintained in two formats: JSON and PHP arrays.

JSON metadata: `scripts/update-metadata.sh` fetches the latest metadata
from Alibaba Cloud.

PHP metadata: `php-generator/generate.php` converts JSON metadata into
PHP arrays.

The Makefile automates the update and build process. Run:

    make

The following artifacts will be generated in the `build/` directory:

- release-<YYYYMMDD>-json.tar.gz
- release-<YYYYMMDD>-php.tar.gz

To build only one format, run one of the following commands:

    make build-json
    make build-php

Because Alibaba Cloud provides many services, metadata updates can take
time. Set `CONCURRENCY` to control how many HTTP requests run at the same
time. Use `make -j2` to fetch English and Chinese metadata in parallel:

    CONCURRENCY=8 make -j2


RELEASE
-------
After building the artifacts, you may want to share them with other projects
so they can reference the latest API changes. This repository publishes
artifacts to Cloudflare R2. Specify the bucket name with the `R2_BUCKET`
environment variable. Tarballs and their associated signatures are then
uploaded to that bucket.

Make sure npm is available, because uploads are handled by the Wrangler CLI
under the hood. For example:

    R2_BUCKET=<your-bucket-name> make release


AUTHOR
------
Zhineng Li <[email protected]>