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
Jason Stirnaman 2021-10-07 12:01:19 -05:00 committed by GitHub
parent fe36eb8470
commit a70df65a79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 4556 deletions

View File

@ -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
```

View File

@ -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 \

View File

@ -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"
}

File diff suppressed because it is too large Load Diff