Use internal xrefs in docs code gen script (#1588)
This commit is contained in:
@ -58,14 +58,24 @@ Once your changes are ready to submit for review:
|
|||||||
|
|
||||||
### Code generation
|
### Code generation
|
||||||
|
|
||||||
The entire content of the API folder is generated as well as the `docs/reference.asciidoc` file.<br/>
|
The contents of the API folder and the `docs/reference.asciidoc` file are generated by a script.<br/>
|
||||||
If you want to run the code generation you should run the following command:
|
To run the script, use the following command:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
node scripts/generate --tag <tag name>
|
node scripts/generate --version <version name>
|
||||||
# or
|
```
|
||||||
node scripts/generate --branch <branch name>
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
node scripts/generate --version 7.15.0
|
||||||
|
```
|
||||||
|
|
||||||
|
To run the script for an unreleased snapshot version, append `-SNAPSHOT` to the version name. For example:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
node scripts/generate --version 8.0.0-SNAPSHOT
|
||||||
```
|
```
|
||||||
Then you should copy the content of `api/generated.d.ts` into the `index.d.ts` file *(automate this step would be a nice pr!)*.
|
|
||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
There are different test scripts, usually during development you only need to run `npm test`, but if you want you can run just a part of the suite, following you will find all the testing scripts and what they do.
|
There are different test scripts, usually during development you only need to run `npm test`, but if you want you can run just a part of the suite, following you will find all the testing scripts and what they do.
|
||||||
|
|||||||
@ -222,7 +222,7 @@ function generateApiDoc (spec) {
|
|||||||
doc += `link:${documentationUrl}[Documentation] +\n`
|
doc += `link:${documentationUrl}[Documentation] +\n`
|
||||||
}
|
}
|
||||||
if (codeExamples.includes(name)) {
|
if (codeExamples.includes(name)) {
|
||||||
doc += `{jsclient}/${name.replace(/\./g, '_')}_examples.html[Code Example] +\n`
|
doc += `<<${name.replace(/\./g, '_')}_examples,Code Example>> +\n`
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.length !== 0) {
|
if (params.length !== 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user