Fix api docs dependencies (#3226)
* fix: broken install URL. Closes #3122. * fix: remove redoc-cli from package.json. Set redoc-cli@version specifier in generate-api-docs.sh instead. Remove the requirement to run yarn install just for redoc-cli. * fix: update README with npx help. * Update api-docs/README.md Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com> * Update api-docs/README.md Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com> Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>pull/3227/head
parent
fe36eb8470
commit
a70df65a79
|
|
@ -26,17 +26,20 @@ 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
|
||||
generate-api-docs.sh
|
||||
sh generate-api-docs.sh
|
||||
```
|
||||
|
|
|
|||
|
|
@ -40,8 +40,10 @@ weight: 304
|
|||
---
|
||||
"
|
||||
|
||||
redocCLI="redoc-cli@0.12.3"
|
||||
|
||||
# Use Redoc to generate the v2 API html
|
||||
npx redoc-cli bundle $version/swagger.yml \
|
||||
npx --yes $redocCLI bundle $version/swagger.yml \
|
||||
-t template.hbs \
|
||||
--title="InfluxDB $titleVersion API documentation" \
|
||||
--options.sortPropsAlphabetically \
|
||||
|
|
@ -52,7 +54,7 @@ weight: 304
|
|||
|
||||
|
||||
# Use Redoc to generate the v1 compatibility API html
|
||||
npx redoc-cli bundle $version/swaggerV1Compat.yml \
|
||||
npx --yes $redocCLI bundle $version/swaggerV1Compat.yml \
|
||||
-t template.hbs \
|
||||
--title="InfluxDB $titleVersion v1 compatibility API documentation" \
|
||||
--options.sortPropsAlphabetically \
|
||||
|
|
|
|||
|
|
@ -3,9 +3,5 @@
|
|||
"name": "api-docs",
|
||||
"version": "1.0.0",
|
||||
"description": "InfluxDB API documentation",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"npx": "^10.2.2",
|
||||
"redoc-cli": "0.9.13"
|
||||
}
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
|||
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