Skip to content

Commit aff679f

Browse files
committed
README.md: Update
1 parent 1b4ac28 commit aff679f

1 file changed

Lines changed: 21 additions & 3 deletions

File tree

tools/api_refs/README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,20 @@ Requires [`jq`](https://stedolan.github.io/jq/download/)
66

77
## Basic usage
88

9-
`tools/api_refs/api_refs.sh` is a script generating PHP API Reference, by default, under `docs/api/php_api/php_api_reference/`.
9+
`tools/api_refs/api_refs.sh` is a script generating PHP & REST API References, by default, under `docs/api/php_api/php_api_reference/` and `docs/api/rest_api/rest_api_reference/`.
1010

11-
- For Composer, if you do not use a global authentication to retrieve _Commerce_ edition, a path to an auth.json file can be given as first argument. For example:
11+
- For Composer, if you do not use a global authentication to retrieve _Commerce_ edition, a path to an auth.json file can be given as first optional argument. For example:
1212
```
1313
tools/api_refs/api_refs.sh ~/www/ibexa-dxp-commerce/auth.json
1414
```
15-
- The second argument can be a path to an output directory to use instead of the default one. For example, using the Composer global authentication file as first argument and the path to directory (which is created if it doesn't exist yet):
15+
- The second optional argument can be a path to an output directory to use instead of the default one. For example, using the Composer global authentication file as first argument and the path to directory (which is created if it doesn't exist yet):
1616
```
1717
tools/api_refs/api_refs.sh ~/.composer/auth.json ./docs/api/php_api/php_api_reference-TMP
1818
```
19+
- The next three optional arguments are the REST API files
20+
- 3rd arg is the reference HTML file path
21+
- 4th arg is the file path for the OpenAPI specification in YAML format
22+
- 5th arg is the file path for the OpenAPI specification in JSON format
1923

2024
## Rebuild example
2125

@@ -100,3 +104,17 @@ if [ 0 -eq $DXP_ALREADY_EXISTS ]; then
100104
composer require --no-interaction --ignore-platform-reqs --no-scripts ibexa/$MY_PACKAGE "$MY_BRANCH as $DXP_VERSION";
101105
fi;
102106
```
107+
108+
### Run as GitHub Action
109+
110+
#### Using `gh`
111+
112+
With [GitHub CLI `gh`](https://cli.github.com/), you can trigger a GitHub Action workflow to build the API References
113+
114+
```bash
115+
gh workflow run api_refs.yaml -f version=<tag> -f use_dev_version=<false|true> --ref <branch>
116+
```
117+
118+
`-f version=<tag>` to pass the Ibexa DXP version tag for which the API References are built.
119+
`-f use_dev_version=<false|true>` to use the released version designed by the tag, or to use the development version (`v5.0.x-dev`) for an incoming tag.
120+
`--ref <branch>` to use a `api_refs.yaml` workflow from a given branch instead of the default branch (`5.0`).

0 commit comments

Comments
 (0)