Revert "Fix api docs dependencies (#3226)" (#3227)

This reverts commit a70df65a79.
pull/3229/head^2
Jason Stirnaman 2021-10-07 12:09:04 -05:00 committed by GitHub
parent a70df65a79
commit b594e30782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4556 additions and 15 deletions

View File

@ -26,20 +26,17 @@ api-docs/
Because the API documentation HTML is gitignored, you must manually generate it Because the API documentation HTML is gitignored, you must manually generate it
to view the API docs locally. 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: In your terminal, from the root of the docs repo, run:
```sh ```sh
cd api-docs cd api-docs
# Install dependencies
yarn install
# Generate the API docs # Generate the API docs
sh generate-api-docs.sh generate-api-docs.sh
``` ```

View File

@ -40,10 +40,8 @@ weight: 304
--- ---
" "
redocCLI="redoc-cli@0.12.3"
# Use Redoc to generate the v2 API html # 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 \ -t template.hbs \
--title="InfluxDB $titleVersion API documentation" \ --title="InfluxDB $titleVersion API documentation" \
--options.sortPropsAlphabetically \ --options.sortPropsAlphabetically \
@ -54,7 +52,7 @@ weight: 304
# Use Redoc to generate the v1 compatibility API html # 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 \ -t template.hbs \
--title="InfluxDB $titleVersion v1 compatibility API documentation" \ --title="InfluxDB $titleVersion v1 compatibility API documentation" \
--options.sortPropsAlphabetically \ --options.sortPropsAlphabetically \

View File

@ -3,5 +3,9 @@
"name": "api-docs", "name": "api-docs",
"version": "1.0.0", "version": "1.0.0",
"description": "InfluxDB API documentation", "description": "InfluxDB API documentation",
"license": "MIT" "license": "MIT",
"dependencies": {
"npx": "^10.2.2",
"redoc-cli": "0.9.13"
}
} }

File diff suppressed because it is too large Load Diff