parent
a70df65a79
commit
b594e30782
|
@ -26,20 +26,17 @@ api-docs/
|
|||
Because the API documentation HTML is gitignored, you must manually generate it
|
||||
to view the API docs locally.
|
||||
|
||||
Verify that you have a working `npx` (it's included with Node.js).
|
||||
In your terminal, run:
|
||||
|
||||
```sh
|
||||
npx --version
|
||||
```
|
||||
|
||||
If `npx` returns errors, [download](https://nodejs.org/en/) and run a recent version of the Node.js installer for your OS.
|
||||
|
||||
In your terminal, from the root of the docs repo, run:
|
||||
|
||||
```sh
|
||||
|
||||
|
||||
|
||||
cd api-docs
|
||||
|
||||
# Install dependencies
|
||||
yarn install
|
||||
|
||||
# Generate the API docs
|
||||
sh generate-api-docs.sh
|
||||
generate-api-docs.sh
|
||||
```
|
||||
|
|
|
@ -40,10 +40,8 @@ weight: 304
|
|||
---
|
||||
"
|
||||
|
||||
redocCLI="redoc-cli@0.12.3"
|
||||
|
||||
# Use Redoc to generate the v2 API html
|
||||
npx --yes $redocCLI bundle $version/swagger.yml \
|
||||
npx redoc-cli bundle $version/swagger.yml \
|
||||
-t template.hbs \
|
||||
--title="InfluxDB $titleVersion API documentation" \
|
||||
--options.sortPropsAlphabetically \
|
||||
|
@ -54,7 +52,7 @@ weight: 304
|
|||
|
||||
|
||||
# Use Redoc to generate the v1 compatibility API html
|
||||
npx --yes $redocCLI bundle $version/swaggerV1Compat.yml \
|
||||
npx redoc-cli bundle $version/swaggerV1Compat.yml \
|
||||
-t template.hbs \
|
||||
--title="InfluxDB $titleVersion v1 compatibility API documentation" \
|
||||
--options.sortPropsAlphabetically \
|
||||
|
|
|
@ -3,5 +3,9 @@
|
|||
"name": "api-docs",
|
||||
"version": "1.0.0",
|
||||
"description": "InfluxDB API documentation",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"npx": "^10.2.2",
|
||||
"redoc-cli": "0.9.13"
|
||||
}
|
||||
}
|
||||
|
|
4542
api-docs/yarn.lock
4542
api-docs/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue