* 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> * fix: replace prompt override option for compatibility with npm@6. Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| cloud | ||
| v2.0 | ||
| README.md | ||
| generate-api-docs.sh | ||
| getswagger.sh | ||
| package.json | ||
| template.hbs | ||
| yarn.lock | ||
README.md
Generate InfluxDB API docs
InfluxDB uses Redoc and
redoc-cli to generate
API documentation from the InfluxDB swagger.yml.
To minimize repo size, the generated API documentation HTML is gitignored, therefore
not committed directly to the docs repo.
The InfluxDB docs deployment process uses swagger files in the api-docs directory
to generate version-specific API documentation.
Versioned swagger files
The structure versions swagger files using the following pattern:
api-docs/
├── v2.0/
│ └── swagger.yml
├── v2.1/
│ └── swagger.yml
├── v2.2/
│ └── swagger.yml
└── etc...
Generate API docs locally
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:
npx --version
If npx returns errors, download and run a recent version of the Node.js installer for your OS.
In your terminal, from the root of the docs repo, run:
cd api-docs
# Generate the API docs
sh generate-api-docs.sh