Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jts/api uplift #5875

Draft
wants to merge 59 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
f11461a
Update API reference documentation
peterbarnett03 Feb 3, 2025
4314589
feat(v3): WIP: Revise API specs for Core and Enterprise
jstirnaman Feb 5, 2025
f15d785
chore(monolith): Core HTTP API and OpenAPI .info content for Core and…
jstirnaman Feb 18, 2025
235b172
fix(api): Skip to next api-docs directory if the current dir doesn't …
jstirnaman Feb 18, 2025
0b7b73b
fix(ci): Remove Nightwatch dependency
jstirnaman Feb 19, 2025
b6adbbf
fix(api): Only call Google Tag Manager if hostname has influxdata.com…
jstirnaman Feb 19, 2025
846d3a9
fix(api): Update glossary links. Remove old cloud-serverless directory
jstirnaman Feb 21, 2025
b3bb9c4
feat(api): InfluxDB3 Core API reference, API fixes, and e2e tests
jstirnaman Feb 21, 2025
789c6fb
fix(api): Core: revise tags and tag-groups, add trait tags
jstirnaman Feb 25, 2025
f0245e3
feat(api-ref): API reference for Core and Enterprise
jstirnaman Feb 25, 2025
4194ef5
fix(api): Add shortDescription to replace summary
jstirnaman Feb 26, 2025
884bfd1
feat(api): Add Ask AI widget to API ref docs
jstirnaman Feb 26, 2025
bd93174
fix(api): confusing nav behavior with endpoints duplicated among tag …
jstirnaman Feb 26, 2025
b9de8b4
chore(ai): Add reminder to update the script in template.hbs
jstirnaman Feb 26, 2025
4887aa5
fix(api): links and headings in local API refs.
jstirnaman Feb 26, 2025
4403dd9
fix: LInks and headings. Replace `latest` with `v2`. Specify OSS v2 i…
jstirnaman Feb 27, 2025
40d2e0f
Apply suggestions from code review
jstirnaman Mar 4, 2025
5c19648
Update api-docs/influxdb3/enterprise/v3/ref.yml
jstirnaman Mar 4, 2025
ed42c1e
Update api-docs/influxdb3/core/v3/content/info.yml
jstirnaman Mar 4, 2025
1654d3c
Merge branch 'master' into core-enterprise-api-ref
jstirnaman Mar 4, 2025
e014f74
chore(api-ref): Uplift API reference docs:
jstirnaman Sep 6, 2024
4543bf6
fix(api): Use forked hugo-data-to-pages. Add async.
jstirnaman Sep 10, 2024
33ff88a
Add configuration. Store output paths and metadata in /data. Refactor…
jstirnaman Sep 11, 2024
53809fb
chore: Generalize.
jstirnaman Sep 11, 2024
8a96ea5
fix: removes empty strings resulting from snakifying non-word charact…
jstirnaman Sep 11, 2024
807ee73
WIP: draft TODO. Simplify code.
jstirnaman Sep 17, 2024
c5dd3e3
To build the API pages, run `yarn run build-apidocs` from the project…
jstirnaman Sep 23, 2024
6eb7a1e
chore(api): Use Spectral for linting OpenAPI
jstirnaman Sep 27, 2024
697fce1
WIP(api): hide rapidoc sidebar, add API _index page, replace rapidoc …
jstirnaman Sep 27, 2024
69429a9
WIP: API and JavaScript revamp
jstirnaman Nov 19, 2024
f1c1658
fix(api): comment
jstirnaman Nov 21, 2024
4046ba7
chore: restore dropdown behavior and rename version-selector more gen…
jstirnaman Nov 21, 2024
893f297
feat: load AI chat window
jstirnaman Sep 26, 2024
5636682
chore(ai): Add org-id for site authorization.
jstirnaman Sep 30, 2024
9b94033
chore(ai): store AI workflows and custom GPT instruction sets.
jstirnaman Oct 1, 2024
325b2b8
chore(ai): add instructions directory and revise Doc instructions.
jstirnaman Oct 1, 2024
bc1de17
WIP(ai): Added Yext AI chat for testing.
jstirnaman Oct 25, 2024
e4935d7
WIP(ai): Yext chat customizations
jstirnaman Oct 28, 2024
d85dc9a
WIP(ai): Yext chat customizations
jstirnaman Oct 28, 2024
905fe67
chore(ai): update AI instructions and product workflow, draft list of…
jstirnaman Oct 29, 2024
7767bc2
chore(ai): Moved ai/tests to doc for now
jstirnaman Nov 8, 2024
7046232
chore(ai): Update API key for testing chat updates
jstirnaman Nov 19, 2024
8ac27bc
chore(api-ref): Uplift API reference docs:
jstirnaman Sep 6, 2024
0335c8c
fix(api): Use forked hugo-data-to-pages. Add async.
jstirnaman Sep 10, 2024
32a643d
Add configuration. Store output paths and metadata in /data. Refactor…
jstirnaman Sep 11, 2024
d895b39
chore: Generalize.
jstirnaman Sep 11, 2024
f9ab7e9
fix: removes empty strings resulting from snakifying non-word charact…
jstirnaman Sep 11, 2024
0091f3b
WIP: draft TODO. Simplify code.
jstirnaman Sep 17, 2024
6df73de
To build the API pages, run `yarn run build-apidocs` from the project…
jstirnaman Sep 23, 2024
3206627
chore(api): Use Spectral for linting OpenAPI
jstirnaman Sep 27, 2024
16f0311
WIP(api): hide rapidoc sidebar, add API _index page, replace rapidoc …
jstirnaman Sep 27, 2024
6376257
WIP: API and JavaScript revamp
jstirnaman Nov 19, 2024
da49a60
chore(ai): Allow chat configuration and reboot from console.
jstirnaman Nov 20, 2024
9834a89
chore(ai): object property assignment for main.js and AIChat.
jstirnaman Nov 20, 2024
df1c341
chore(deps): Update Vale
jstirnaman Nov 20, 2024
dbd186e
chore(deps): Update cross-spawn due to vulnerability alert.
jstirnaman Nov 20, 2024
2a8b764
chore(api): update options help
jstirnaman Nov 21, 2024
f3ead26
WIP(api): Rename api-docs to api-build-scripts. Fixing API docs menus…
jstirnaman Nov 21, 2024
200881b
chore(api): Use templates for creating pages, page functions return a…
jstirnaman Nov 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .ci/vale/styles/InfluxDB3-Core/Branding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends: substitution
message: Did you mean '%s' instead of '%s'
level: warning
ignorecase: false
# swap maps tokens in form of bad: good
# NOTE: The left-hand (bad) side can match the right-hand (good) side;
# Vale ignores alerts that match the intended form.
swap:
'cloud-serverless|cloud-dedicated|clustered': core
'Cloud Serverless|Cloud Dedicated|Clustered': Core
'API token': database token
10 changes: 10 additions & 0 deletions .ci/vale/styles/InfluxDB3-Core/v3Schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
extends: substitution
message: Did you mean '%s' instead of '%s'
level: warning
ignorecase: false
# swap maps tokens in form of bad: good
# NOTE: The left-hand (bad) side can match the right-hand (good) side;
# Vale ignores alerts that match the intended form.
swap:
'(?i)bucket': database
'(?i)measurement': table
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
command: yarn install
- run:
name: Install API documentation dependencies
command: cd api-docs && yarn install
command: cd api-build-scripts && yarn install
- run:
name: Generate API documentation
command: cd api-docs && bash generate-api-docs.sh
command: cd api-build-scripts && bash generate-api-docs.sh
- run:
name: Inject Flux stdlib frontmatter
command: node ./flux-build-scripts/inject-flux-stdlib-frontmatter.js
Expand Down
40 changes: 40 additions & 0 deletions .frontmatter-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Title of the page"
},
"description": {
"type": "string",
"description": "Page description that supports multi-line text"
},
"menu": {
"type": "object",
"properties": {
"influxdb3_core": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Menu item name"
}
},
"required": ["name"]
}
}
},
"weight": {
"type": "integer",
"description": "Order weight for menu items",
"minimum": 0
},
"source": {
"type": "string",
"description": "Path to source content file",
"pattern": "^/shared/.+\\.md$"
}
},
"required": ["title", "description", "menu", "weight"]
}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ node_modules
/resources
.hugo_build.lock
/content/influxdb/*/api/**/*.html
/api-docs/redoc-static.html*
/build-scripts/api-reference/redoc-static.html*
/data/api*
/content/influxdb/*/api/**
.vscode/*
.idea
**/config.toml
Expand Down
3 changes: 3 additions & 0 deletions .husky/_/build
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ call_lefthook()
elif command -v mint >/dev/null 2>&1
then
mint run csjones/lefthook-plugin "$@"
elif command -v npx >/dev/null 2>&1
then
npx lefthook "$@"
else
echo "Can't find lefthook in PATH"
fi
Expand Down
3 changes: 3 additions & 0 deletions .husky/_/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ call_lefthook()
elif command -v mint >/dev/null 2>&1
then
mint run csjones/lefthook-plugin "$@"
elif command -v npx >/dev/null 2>&1
then
npx lefthook "$@"
else
echo "Can't find lefthook in PATH"
fi
Expand Down
3 changes: 3 additions & 0 deletions .husky/_/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ call_lefthook()
elif command -v mint >/dev/null 2>&1
then
mint run csjones/lefthook-plugin "$@"
elif command -v npx >/dev/null 2>&1
then
npx lefthook "$@"
else
echo "Can't find lefthook in PATH"
fi
Expand Down
3 changes: 3 additions & 0 deletions .husky/_/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ call_lefthook()
elif command -v mint >/dev/null 2>&1
then
mint run csjones/lefthook-plugin "$@"
elif command -v npx >/dev/null 2>&1
then
npx lefthook "$@"
else
echo "Can't find lefthook in PATH"
fi
Expand Down
15 changes: 14 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
{
"vale.valeCLI.config": " \"${workspaceFolder}/.vale.ini\"",
"commentAnchors.tags.anchors":
{ "SOURCE": {
"scope": "file",
"behavior": "link",
"iconColor": "#FF0000",
"highlightColor": "#FF0000",
"style": "bold"
}},
"commentAnchors.workspace.matchFiles": "**/*.{md,ini,json,yaml,yml}",
"commentAnchors.workspace.enabled": true,
"yaml.schemas": {
"./.frontmatter-schema.json": "${workspaceFolder}/content/**/*.md"
},
"vale.valeCLI.config": "${workspaceFolder}/.vale.ini",
"vale.valeCLI.minAlertLevel": "warning",
}
36 changes: 23 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ To install dependencies listed in package.json:
4. Install the Yarn package manager and run `yarn` to install project dependencies.

`package.json` contains dependencies for linting and running Git hooks.
docs-v2 uses [Lefthook](https://github.com/evilmartians/lefthook) to configure and manage pre-commit hooks for linting and testing Markdown content.

Other dependencies used in the project:

- **[husky](https://github.com/typicode/husky)**: manages Git hooks, including the pre-commit hook for linting and testing
- **[lint-staged](https://github.com/lint-staged/lint-staged)**: passes staged files to commands
- **[prettier](https://prettier.io/docs/en/)**: formats code, including Markdown, according to style rules for consistency

### Install Docker
Expand All @@ -65,13 +66,24 @@ The tests defined in `compose.yaml` use the dependencies and execution
environment from this image.

```bash
docker build -t influxdata:docs-pytest -f Dockerfile.pytest .
docker build -t influxdata/docs-pytest:latest -f Dockerfile.pytest .
```

### Run the documentation locally (optional)

To run the documentation locally, follow the instructions provided in the README.

### Install Visual Studio Code extensions

If you use Microsoft Visual Studio (VS) Code, you can install extensions
to help you navigate, check, and edit files.

docs-v2 contains a `./.vscode/settings.json` that configures the following extensions:

- Comment Anchors: recognizes tags (for example, `//SOURCE`) and makes links and filepaths clickable in comments.
- Vale: shows linter errors and suggestions in the editor.
- YAML Schemas: validates frontmatter attributes.

### Make your changes

Make your suggested changes being sure to follow the [style and formatting guidelines](#style--formatting) outline below.
Expand All @@ -80,27 +92,25 @@ Make your suggested changes being sure to follow the [style and formatting guide

### Automatic pre-commit checks

docs-v2 uses Husky to manage Git hook scripts.
When you try to commit your changes (for example, `git commit`), Git runs
scripts configured in `.husky/pre-commit`, including linting and tests for your **staged** files.
docs-v2 uses Lefthook to manage Git hooks, such as pre-commit hooks that lint Markdown and test code blocks.
When you try to commit changes (`git commit`), Git runs
the commands configured in `lefthook.yml` which pass your **staged** files to Vale, Prettier, and Pytest (in a Docker container).

### Skip pre-commit hooks

**We strongly recommend running linting and tests**, but you can skip them
(and avoid installing dependencies)
by including the `HUSKY=0` environment variable or the `--no-verify` flag with
by including the `LEFTHOOK=0` environment variable or the `--no-verify` flag with
your commit--for example:

```sh
git commit -m "<COMMIT_MESSAGE>" --no-verify
```

```sh
HUSKY=0 git commit
LEFTHOOK=0 git commit
```

For more options, see the [Husky documentation](https://typicode.github.io/husky/how-to.html#skipping-git-hooks).

### Set up test scripts and credentials

To set up your docs-v2 instance to run tests locally, do the following:
Expand Down Expand Up @@ -331,7 +341,7 @@ Push your changes up to your forked repository, then [create a new pull request]

Most docs-v2 documentation content uses [Markdown](https://en.wikipedia.org/wiki/Markdown).

_Some parts of the documentation, such as `./api-docs`, contain Markdown within YAML and rely on additional tooling._
_Some parts of the documentation, such as `./api-build-scripts`, contain Markdown within YAML and rely on additional tooling._

### Semantic line feeds

Expand Down Expand Up @@ -1752,7 +1762,7 @@ _This example assumes v2.0 is the most recent version and v2.1 is the new versio
```

7. Copy the InfluxDB `swagger.yml` specific to the new version into the
`/api-docs/v<version-number>/` directory.
`/api-build-scripts/v<version-number>/` directory.

8. Commit the changes and push the new branch to GitHub.

Expand All @@ -1767,4 +1777,4 @@ InfluxData uses [Redoc](https://github.com/Redocly/redoc) to generate the full
InfluxDB API documentation when documentation is deployed.
Redoc generates HTML documentation using the InfluxDB `swagger.yml`.
For more information about generating InfluxDB API documentation, see the
[API Documentation README](https://github.com/influxdata/docs-v2/tree/master/api-docs#readme).
[API Documentation README](https://github.com/influxdata/docs-v2/tree/master/api-build-scripts#readme).
8 changes: 7 additions & 1 deletion Dockerfile.pytest
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
python3-venv \
rsync \
telegraf \
wget
wget \
yq

# Install InfluxDB 3 Core
RUN curl -O https://www.influxdata.com/d/install_influxdb3.sh \
&& chmod +x install_influxdb3.sh \
&& bash -c yes | ./install_influxdb3.sh

RUN ln -s /usr/bin/python3 /usr/bin/python

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ including our GPG key, can be found at https://www.influxdata.com/how-to-report-

_**Note:** The most recent version of Hugo tested with this documentation is **0.123.8**._

3. To generate the API docs, see [api-docs/README.md](api-docs/README.md).
3. To generate the API docs, see [api-build-scripts/README.md](api-build-scripts/README.md).

4. **Start the Hugo server**

Expand Down
46 changes: 46 additions & 0 deletions ai/gpt/instructions/doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Doc writes technical software documentation for InfluxData. The public web site is https://docs.influxdata.com and the source repository is https://github.com/influxdata/docs-v2.
Documentation provides step-by-step guides and reference documentation for InfluxDB and associated clients (CLIs, client libraries (SDKs), and Telegraf (https://docs.influxdata.com/telegraf/v1/)), and the legacy v1 components Kapacitor and Chronograf.

When a user asks a question and doesn't include a product from the list below, ask them which product in the list they are using, along with the version and query language:

InfluxDB OSS 1.x (v1)
- Documentation: https://docs.influxdata.com/influxdb/v1/
- Query languages: v1.8+ supports InfluxQL and Flux
- Clients: Telegraf, influx CLI, v1 client libraries
InfluxDB Enterprise (v1)
- Documentation: https://docs.influxdata.com/enterprise_influxdb/v1/
- Query languages: v1.8+ supports InfluxQL and Flux
- Clients: Telegraf, influx CLI, v1 client libraries
InfluxDB OSS 2.x (v2)
- Documentation: https://docs.influxdata.com/influxdb/v2/
- Query languages: InfluxQL and Flux
- Clients: Telegraf, influx CLI, v2 client libraries
InfluxDB Cloud (v2, multi-tenant)
- Documentation: https://docs.influxdata.com/influxdb/cloud/
- Query languages: InfluxQL and Flux
- Clients: Telegraf, influx CLI, v2 client libraries
InfluxDB Clustered (v3, 3.0, self-managed distributed)
- Documentation: https://docs.influxdata.com/influxdb/clustered/
- Query languages: SQL and InfluxQL
- Clients: Telegraf, influxctl CLI, v3 client libraries
InfluxDB Cloud Dedicated (3.0, v3, InfluxData-managed single tenant)
- Documentation: https://docs.influxdata.com/influxdb/cloud-dedicated/
- Query languages: SQL and InfluxQL
- Clients: Telegraf, influxctl CLI, v3 client libraries
InfluxDB Cloud Serverless (v3, 3.0, InfluxData-managed multi-tenant)
- Documentation: https://docs.influxdata.com/influxdb/clustered/
- Query languages: SQL and InfluxQL
- Clients: Telegraf, influx CLI, v3 client libraries

If I ask about a REST API or SDK (client library) and don't specify a product, ask which product.
For API client libraries, refer to the documentation and to the source repositories in https://github.com/InfluxCommunity for the version-specific client library.

When writing documentation, always use Google Developer Documentation style guidelines and Markdown format.
If writing REST API reference documentation follow YouTube Data API style and Google Developer Documentation style guidelines.

The project uses the Hugo static site generator to build the documentation.
The site uses JavaScript and jQuery.
For information about linting, tests (using pytests for codeblocks), shortcode <shortcode_name>, refer to https://github.com/influxdata/docs-v2/blob/master/README.md and https://github.com/influxdata/docs-v2/blob/master/CONTRIBUTING.md.
If something in CONTRIBUTING.md needs clarification, then give me the suggested revision for CONTRIBUTING.md in Markdown.

The community forum is https://community.influxdata.com/ and should not be used as a primary source of information, but might contain useful suggestions or solutions to specific problems from users.
30 changes: 30 additions & 0 deletions ai/workflows/ask-product.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
When a user asks a question and doesn't include a product from the list below, ask them which product in the list they are using, along with the version and query language:

InfluxDB OSS 1.x (v1)
- Documentation: https://docs.influxdata.com/influxdb/v1/
- Query languages: v1.8+ supports InfluxQL and Flux
- Clients: Telegraf, influx CLI, v1 client libraries
InfluxDB Enterprise (v1)
- Documentation: https://docs.influxdata.com/enterprise_influxdb/v1/
- Query languages: v1.8+ supports InfluxQL and Flux
- Clients: Telegraf, influx CLI, v1 client libraries
InfluxDB OSS 2.x (v2)
- Documentation: https://docs.influxdata.com/influxdb/v2/
- Query languages: InfluxQL and Flux
- Clients: Telegraf, influx CLI, v2 client libraries
InfluxDB Cloud (v2, multi-tenant)
- Documentation: https://docs.influxdata.com/influxdb/cloud/
- Query languages: InfluxQL and Flux
- Clients: Telegraf, influx CLI, v2 client libraries
InfluxDB Clustered (v3, 3.0, self-managed distributed)
- Documentation: https://docs.influxdata.com/influxdb/clustered/
- Query languages: SQL and InfluxQL
- Clients: Telegraf, influxctl CLI, v3 client libraries
InfluxDB Cloud Dedicated (3.0, v3, InfluxData-managed single tenant)
- Documentation: https://docs.influxdata.com/influxdb/cloud-dedicated/
- Query languages: SQL and InfluxQL
- Clients: Telegraf, influxctl CLI, v3 client libraries
InfluxDB Cloud Serverless (v3, 3.0, InfluxData-managed multi-tenant)
- Documentation: https://docs.influxdata.com/influxdb/clustered/
- Query languages: SQL and InfluxQL
- Clients: Telegraf, influx CLI, v3 client libraries
File renamed without changes.
1 change: 1 addition & 0 deletions api-build-scripts/.spectral.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extends: ["spectral:oas", "spectral:asyncapi", "spectral:arazzo"]
Loading