Commit Graph

50 Commits (api-docs-uplift)

Author SHA1 Message Date
Jason Stirnaman bbe513e0c5 feat(api-docs): add externalDocs to tags, strip absolute URLs, fix link pipeline
- Add standard OpenAPI `externalDocs` field to all tags.yml files that
  have `x-related` entries (uses first link as the primary doc link)
- Convert `externalDocs` to `{title, href}` objects in related links
  instead of bare URL strings
- Strip `https://docs.influxdata.com` from description/summary fields
  in `transformDocLinks()` so Hugo pages use relative paths
- Fix article generation reading from absolutified download spec instead
  of the Hugo spec with relative links (new `hugoSpecPath` output)
- Add `externalDocs.url` support to `absolutifyLinks()` for downloads
2026-03-16 15:34:43 -05:00
Jason Stirnaman f5535c9d5c feat(api): Hugo-native API reference rendering
Hugo-native templates for API
reference documentation. Operations render as server-side HTML instead
of client-side Redoc, providing faster page loads, full SEO
indexability, and consistent styling.

Architecture:
- Tag-based navigation: operations grouped by OpenAPI tag, accessed
  via tag pages only (no individual operation URLs)
- Generation script auto-discovers products from .config.yml files,
  deriving Hugo paths and menu keys from directory structure
- Per-tag JSON/YAML chunks for fast Hugo template rendering
- Inline curl examples generated from OpenAPI specs at build time

Templates (layouts/api/, layouts/partials/api/):
- tag-renderer.html: renders all operations for a tag
- operation.html: individual operation with parameters, request body,
  responses, and schema rendering
- code-sample.html: curl examples with Ask AI integration
- section-children.html: tag listing on section index pages
- all-endpoints-list.html: all operations sorted by path

Generation (api-docs/scripts/generate-openapi-articles.ts):
- Auto-discovery from .config.yml replaces hardcoded productConfigs
- Each API section generates independently (no cross-spec merging)
- Frontmatter-driven template data (specDownloadPath, articleDataKey)
- Link transformation: /influxdb/version/ placeholders resolved to
  product-specific paths

Removed:
- Redoc renderer, JavaScript components, and CSS
- Shadow DOM test infrastructure (~160 lines)
- Operation page generation (dead generatePathPages function)
- mergeArticleData() and slugifyDisplayName()

Styles (assets/styles/layouts/_api-*.scss):
- 3-column layout: sidebar, content, sticky TOC
- Theme-aware code blocks for curl examples
- Method badges (GET/POST/PUT/DELETE) with color coding
- Collapsible schema sections with depth tracking

Tests (cypress/e2e/content/api-reference.cy.js):
- Tag page rendering with operation structure
- Download button verification per section
- All-endpoints page with operation cards
- Related links from x-related OpenAPI extension
- Code sample and Ask AI link validation
2026-03-15 22:17:33 -05:00
Jason Stirnaman ebc91d2263 fix(api-docs): split v2 Compatibility tag, fix auth descriptions and info.yml
- Split generic "v2 Compatibility" tag into "Buckets (v2 compatible)"
  and "Delete (v2 compatible)" in both v1 specs and tags.yml
- Rewrite Authentication tag descriptions: explain that auth is
  disabled by default, move explanation before security definitions
- Fix broken markdown link in auth descriptions ([enabled in the
  configuration] had no URL)
- Fix x-related format in both v1 tags.yml (flat object → list)
- Fix Enterprise v1 x-related href to correct page path
- Fix Cloud Dedicated info.yml indentation (broke YAML parsing)
2026-03-12 15:59:13 -05:00
Jason Stirnaman 54f9695613 fix(api-docs): restore Redoc security scheme injection in Authentication tags
Add ReDoc-Inject: <security-definitions> directive and scheme links to
the Authentication tag description in all 9 tags.yml files. This renders
the security scheme definitions inline in the Redoc HTML, matching the
pre-uplift behavior. Each product lists its actual security schemes with
anchor links to the scheme definitions section.
2026-03-12 09:34:13 -05:00
Jason Stirnaman 62bd023616 fix(api-docs): add x-traitTag support to post-processor and tags.yml
Add x-traitTag to TagConfig interface so the post-processor propagates
it from tags.yml into specs. Mark all supplementary documentation tags
(Authentication, Quick start, Headers, Usage, etc.) with x-traitTag: true
so Redoc renders them as documentation sections with descriptions rather
than empty operation groups. Also exclude root .config.yml from the
Redoc HTML generation find command.
2026-03-11 17:46:32 -05:00
Jason Stirnaman e2f4d80014 refactor(api-docs): flatten v3 dirs, rewrite build pipeline, add --static-only mode
- Flatten Core/Enterprise v3/ subdirectories to product root
- Rewrite generate-api-docs.sh as clean 3-step pipeline:
  post-process-specs → Redoc HTML → static spec downloads
- Add --static-only flag to generate-openapi-articles.ts
- Remove circular getswagger.sh call from generate-openapi-articles.ts
- Remove dead execCommand function and --skip-fetch flag
- Apply post-processed tag enrichments to all spec files
2026-03-11 17:02:18 -05:00
Jason Stirnaman 24c1e60f2f refactor(api-docs): unify v2 APIs, remove v1-compat specs, migrate mgmt links
Flatten Cloud v2 and OSS v2 spec directories to product root with
self-documenting filenames, matching the pattern used for influxdb3 products.
Remove all 5 v1-compatibility directories — those endpoints are already
included in the main spec (tagged as v1/v2 Compatibility).

Old v1-compat URLs are preserved as Hugo aliases for redirects.

Also includes:
- Migrate inline markdown links from management API spec descriptions
  into tags.yml x-related fields (Cloud Dedicated + Clustered)
- Wire post-process-specs.ts into generate-api-docs.sh build pipeline
- Fix doubled static/openapi download filenames
- Update project plan with design decisions
2026-03-11 11:04:07 -05:00
Jason Stirnaman c7f9353d0a refactor(api-docs): replace tag-only processor with unified post-process-specs
Extends the tag post-processor into a unified spec post-processor that
also applies info.yml and servers.yml content overlays. This replaces
two Redocly decorators (set-info, set-servers) with a single TypeScript
script, moving toward removing the Redocly dependency.

- Rename apply-tag-config.ts → post-process-specs.ts
- Add info overlay support (merges fields from content/info.yml)
- Add servers overlay support (replaces spec.servers from content/servers.yml)
- Use same discovery convention as Redocly docs-content.cjs (API-specific
  first, product-level fallback)
- Load spec once, apply all transforms, write once if modified
- Skip Redocly postProcess for management specs in getswagger.sh (prevents
  unwanted $ref chain collapsing)
- Restore management@0 API entries in cloud-dedicated and clustered configs
- 13 tests, 41 assertions, all passing
2026-03-10 17:23:20 -05:00
Jason Stirnaman abc789013f refactor(api-docs): flatten version subdirectories for v2-compat and v1 products
Drop redundant version subdirectories and use self-documenting
filenames for 5 products:

v2-compat influxdb3:
  cloud-dedicated/v2/ref.yml  → cloud-dedicated/influxdb3-cloud-dedicated-openapi.yaml
  cloud-serverless/v2/ref.yml → cloud-serverless/influxdb3-cloud-serverless-openapi.yaml
  clustered/v2/ref.yml        → clustered/influxdb3-clustered-openapi.yaml

v1:
  influxdb/v1/v1/ref.yml           → influxdb/v1/influxdb-oss-v1-openapi.yaml
  enterprise_influxdb/v1/v1/ref.yml → enterprise_influxdb/v1/influxdb-enterprise-v1-openapi.yaml

Update .config.yml, getswagger.sh, and generate-openapi-articles.ts
to reference new paths.
2026-03-10 14:24:49 -05:00
Jason Stirnaman aa863012a5 feat(api-docs): add tag post-processor and per-product tags.yml configs
Add apply-tag-config.ts that reads colocated tags.yml files and patches
OpenAPI spec tags in place (descriptions, x-related links, renames).
Runs between getswagger.sh and generate-openapi-articles.ts in the
build pipeline.

Create tags.yml for all 11 product specs:
- Core, Enterprise: extracted from existing spec tag metadata
- v2-compat, v2, v1: new descriptions and x-related links

Include test suite (16 assertions) covering description setting, tag
rename propagation, x-related links, stale/uncovered tag warnings,
silent skip when no config, and malformed YAML failure.
2026-03-10 14:23:37 -05:00
Jason Stirnaman b841590f9f chore(api-docs): remove dead x-tagGroups from all spec files
Remove the x-tagGroups vendor extension from 8 remaining OpenAPI spec
files. This Redocly extension was used for navigation grouping in the
old RapiDoc layout but is ignored by the Hugo-native API templates,
which generate pages from operation tags[] arrays.
2026-03-09 22:07:08 -05:00
Jason Stirnaman 914380ea54 feat(api-docs): extract api-docs changes from feat-api-uplift
Extract all api-docs/ changes from feat-api-uplift into a standalone
branch for independent testing and merging to master.

Changes include:
- Updated generation scripts (generate-openapi-articles.ts,
  openapi-paths-to-hugo-data/index.ts) for Hugo-native templates
- Removed dead x-tagGroups infrastructure (decorator, config files)
- Updated Core and Enterprise specs with tag descriptions, x-related
  links, and Cache Data tag split
- Added v1 product configs and specs (OSS v1, Enterprise v1)
- Updated getswagger.sh for renamed spec files
- Updated generate-api-docs.sh with clean regeneration support
2026-03-09 12:25:00 -05:00
Joel Abshier a0a2eec042
chore: Update openapi spec for Dedicated/Clustered Database and table Rename, Undelete endpoints (#6762) 2026-01-23 14:24:50 -07:00
Scott Anderson 6b1905c1d5
fix: updates write reponses, suggests exponential backoffs (#6574)
* fix: updates write reponses, suggests exponential backoffs, closes influxdata/DAR#557

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix cURL example to use $max_delay variable instead of hardcoded value (#6575)

* Initial plan

* Fix: use $max_delay variable instead of hardcoded 30 in cURL example

Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>
Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>
2025-12-02 11:40:56 -08:00
Jameelah Mercer 4d77cde02e
Update api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml
Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
2025-08-06 09:55:55 -07:00
Jameelah Mercer 89db6cdd51
Update api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml
Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
2025-08-06 09:55:09 -07:00
Jameelah Mercer ce5d9292c5
Update api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml
Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
2025-08-06 09:54:39 -07:00
Jameelah Mercer 6fb6454aa2
Update api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml
Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
2025-08-06 09:54:12 -07:00
Jameelah Mercer 7f17176865
Update api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-05 13:44:08 -07:00
meelahme 3b60c7f253 docs: updating swaggerVwith rp, operationID, and bucket changed to database 2025-08-05 13:21:16 -07:00
Jameelah Mercer c6a11dbb08
Update api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml
Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
2025-08-04 14:37:47 -07:00
Jameelah Mercer 7436f0fbd8
Update api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml
Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
2025-08-04 14:37:18 -07:00
Jameelah Mercer 6efb013714
Update api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml
Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
2025-08-01 13:43:13 -07:00
Jameelah Mercer 6ba77d4808
Update api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml
Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
2025-08-01 13:42:36 -07:00
Jameelah Mercer 7cc0c38df6
Update api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml
Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
2025-08-01 13:42:28 -07:00
Jameelah Mercer 36085a80ea
Update api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml
Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
2025-08-01 13:42:13 -07:00
Jameelah Mercer 33ace56632
Update api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-31 23:22:06 -07:00
Jameelah Mercer e7723172a5
Update api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-31 23:21:58 -07:00
meelahme dbcd8dde73 docs(api): enhance POST /query with JSON chunk parameter support 2025-07-30 15:34:42 -07:00
meelahme 9117e7ab35 feat: Add complete GET /query endpoint to cluster, dedicated, and serverless 2025-07-30 14:48:52 -07:00
Jason Stirnaman 48380fd168 fix(influxdb3): Auth schemes in 3core, 3ent, cloud-dedicated, and clustered:Explains compatibility for different schemasProvides more auth examplesFills missing schemes in API refFixes placeholdersShows that username is optional 2025-07-07 23:10:37 -05:00
Jason Stirnaman 4a800fc7be
Merge branch 'master' into staging/jts-api-distributed 2025-07-02 09:56:24 -05:00
Jason Stirnaman 18b90035a4 fix: broken links and formatting, missing Management API ReDoc security section for auth types 2025-05-19 14:09:38 -05:00
Jason Stirnaman 1dce052e56 fix(JS): Rename CommonJS scripts to .cjs extension, keep type: module as the project default. Update and fix ESLint configuration.
- Renames JavaScript files in flux-build-scripts and api-docs/openapi/plugins to .cjs file extension to declare them as CommonJS module syntax.
2025-05-19 11:34:42 -05:00
Jason Stirnaman 815514c53b
Apply suggestions from code review 2025-05-09 10:24:58 -05:00
Jason Stirnaman 585490b983
Apply suggestions from code review
Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>
2025-05-09 10:22:47 -05:00
Jason Stirnaman 504e7b3d1c feat(dedicated): Admin UI: Add create table, revise create database and custom partitioning
- Add Admin UI instructions for creating a table
- Moves database and table instructions for custom partitioning to separate tab groups
- Revise custom partitioning instructions for consistency.
- Add descriptions and links to Management API ref
2025-05-08 16:24:29 -05:00
Jason Stirnaman 0b9b1e189e
Update api-docs/influxdb3/cloud-dedicated/management/content/tag-groups.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-03-31 16:52:12 -05:00
Jason Stirnaman e4bed73904 feat(clustered): add missing Management API reference (unlike Cloud Dedicated) (Closes #5838)
- Retrieve Graphite API spec for Clustered
- Remove ACCOUNT_ID and CLUSTER_ID references and requirements not used for Clustered
2025-03-31 16:45:21 -05:00
Jason Stirnaman 49355acece fix(dedicated): Specify Dedicated requires account_id and cluster_id 2025-03-31 16:00:17 -05:00
Jason Stirnaman 5a9f04bd5b fix(dedicated): Update Cloud Dedicated API reference (part of #5943) to include token expiration 2025-03-31 15:42:47 -05:00
Jason Stirnaman 40d2e0f938
Apply suggestions from code review
Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>
2025-03-04 16:34:27 -06:00
Jason Stirnaman 4887aa5b66 fix(api): links and headings in local API refs.
- Fix broken links reported by the e2e link checker.
- Add an e2e test for checking internal and external links in API reference docs. Low effort, big win.
2025-02-26 16:20:14 -06:00
Jason Stirnaman bd93174d29 fix(api): confusing nav behavior with endpoints duplicated among tag groups. Closes Remove tag groups from API ref docs that duplicate endpoints in the "All endpoints" tag group. #5868 2025-02-26 16:14:37 -06:00
Jason Stirnaman 4194ef5eb9 fix(api): Add shortDescription to replace summary
- Add a custom x-influxdata-short-description field that replaces the previous non-standard summary field used by Redocly.
- Double quote the title and description vars to preserve the entire value when passing them to the CLI
2025-02-26 16:07:28 -06:00
Jason Stirnaman b3bb9c40f1 feat(api): InfluxDB3 Core API reference, API fixes, and e2e tests
- Adds InfluxDB 3 Core API reference
- Updates scripts
- Removes non-valid info.summary field from specs, replaces with description in metadata
- Simplifies frontmatter generation for HTML template
- Reorg of file structure to mirror the content structure.
- Moves OSS v2 into v2/v2/ref.yml to follow the same pattern as others
- Replaces isDefault API config field with specific aliases.
- Misc. fixes.
- Remove generated HTML files.
2025-02-25 17:10:09 -06:00
Jason Stirnaman 846d3a9e46 fix(api): Update glossary links. Remove old cloud-serverless directory 2025-02-25 17:10:09 -06:00
Jason Stirnaman f15d7857a9 chore(monolith): Core HTTP API and OpenAPI .info content for Core and Enterprise 2025-02-25 17:09:03 -06:00
Jason Stirnaman 8509ea36d6 fix(api-ref): Update getswagger.sh destination paths to use the new directory structure when fetching spec files. Update the redocly plugin module path. 2025-01-28 12:31:47 -06:00
Jason Stirnaman f1d82f4b00 fix(api-docs): Update API reference directories and generation script for influxdb3 URL paths, update links and names in reference content 2025-01-28 10:53:07 -06:00