feat(api): Update config, styles, and content for API docs uplift

- Update hugo.yml config for API docs settings
- Simplify _api-overrides.scss (removed hardcoded content styles)
- Import _api-layout.scss in styles-default.scss
- Update API landing pages for Core and Enterprise with redirects
- Update OpenAPI spec files
- Update dependencies
claude/api-code-samples-plan-MEkQO
Jason Stirnaman 2025-12-08 14:07:55 -06:00
parent 2e18f52521
commit 54fc853c69
10 changed files with 51 additions and 298 deletions

1
.gitignore vendored
View File

@ -12,6 +12,7 @@ package-lock.json
# Content generation
/content/influxdb*/**/api/**/*.html
/content/influxdb*/**/api/**/*.md
!api-docs/**/.config.yml
/api-docs/redoc-static.html*

View File

@ -49,12 +49,13 @@ tags:
Depending on your workflow, use one of the following schemes to authenticate to the InfluxDB 3 API:
| Authentication scheme | Works with |
|:-------------------|:-----------|
| [Bearer authentication](#section/Authentication/BearerAuthentication) | All endpoints |
| [Token authentication](#section/Authentication/TokenAuthentication) | v1, v2 endpoints |
| [Basic authentication](#section/Authentication/BasicAuthentication) | v1 endpoints |
| [Querystring authentication](#section/Authentication/QuerystringAuthentication) | v1 endpoints |
<!-- ReDoc-Inject: <security-definitions> -->
|:----------------------|:-----------|
| Bearer authentication | All endpoints |
| Token authentication | v1, v2 endpoints |
| Basic authentication | v1 endpoints |
| Querystring authentication | v1 endpoints |
See the **Security Schemes** section below for details on each authentication method.
x-traitTag: true
- name: Cache data
description: |

View File

@ -49,12 +49,13 @@ tags:
Depending on your workflow, use one of the following schemes to authenticate to the InfluxDB 3 API:
| Authentication scheme | Works with |
|:-------------------|:-----------|
| [Bearer authentication](#section/Authentication/BearerAuthentication) | All endpoints |
| [Token authentication](#section/Authentication/TokenAuthentication) | v1, v2 endpoints |
| [Basic authentication](#section/Authentication/BasicAuthentication) | v1 endpoints |
| [Querystring authentication](#section/Authentication/QuerystringAuthentication) | v1 endpoints |
<!-- ReDoc-Inject: <security-definitions> -->
|:----------------------|:-----------|
| Bearer authentication | All endpoints |
| Token authentication | v1, v2 endpoints |
| Basic authentication | v1 endpoints |
| Querystring authentication | v1 endpoints |
See the **Security Schemes** section below for details on each authentication method.
x-traitTag: true
- name: Cache data
description: |

View File

@ -1,9 +1,17 @@
////////////////////////////////////////////////////////////////////////////////
// API Documentation Style Overrides
//
// Provides loading spinner and reusable API-related styles.
// Note: Legacy Redoc-specific overrides have been removed in favor of
// Scalar/RapiDoc renderers which use CSS custom properties for theming.
////////////////////////////////////////////////////////////////////////////////
@import "tools/color-palette";
@import "tools/fonts";
// Fonts
$proxima: 'Proxima Nova', sans-serif;
$code: 'IBM Plex Mono', monospace;;
$code: 'IBM Plex Mono', monospace;
// Font weights
$medium: 500;
@ -22,7 +30,7 @@ $bold: 700;
}
@keyframes spinner {
to {transform: rotate(360deg);}
to { transform: rotate(360deg); }
}
.spinner:before {
@ -41,256 +49,15 @@ $bold: 700;
animation: spinner .6s linear infinite;
}
//////////////////////////////// InfluxDB Header ///////////////////////////////
#influx-header {
font-family: $proxima;
padding: 10px ;
display: flex;
align-items: center;
justify-content: space-between;
background-color: $g2-kevlar;
a {
text-decoration: none;
&.back {
color: $g20-white;
transition: color .2s;
&:hover {
color: $b-pool;
}
&:before {
content: "\e919";
font-family: 'icomoon-v2';
margin-right: .65rem;
}
}
&.btn {
padding: .5rem .75rem .5rem .65rem;
font-size: .85rem;
font-weight: 500;
color: $g15-platinum;
background: $g5-pepper;
border-radius: 4.5px;
transition: all .2s;
&:before {
content: "\e934";
display: inline-block;
font-size: .95rem;
margin-right: .5rem;
font-family: 'icomoon-v2';
}
&:hover {
color: $g20-white;
background: $b-pool;
}
}
}
}
// Header Media Queries
@media (max-width: 600px) {
#influx-header span.version {display: none;}
}
////////////////////////////////////////////////////////////////////////////////
/////////////////////////// HTTP Method Badge Colors ///////////////////////////
////////////////////////////////////////////////////////////////////////////////
.cjtbAK {
h1,h2,h3,h4,h5,h6,
p,li,th,td {
font-family: $proxima !important;
}
}
#redoc {
h1,h2,h3 {
font-weight: $medium !important;
}
}
// Section title padding
.dluJDj {
padding: 20px 0;
}
// Page h1
.dTJWQH {
color: $g7-graphite;
font-size: 2rem;
}
// Download button
.jIdpVJ {
background: $b-dodger;
color: $g20-white;
border: none;
border-radius: 3px;
font-family: $proxima;
font-size: .85rem;
font-weight: $medium;
transition: background-color .2s;
&:hover {
background-color: $b-pool;
}
}
// Tag h1s
.WxWXp {
color: $g7-graphite;
font-size: 1.75rem;
}
// Summaru h2s and table headers
.ioYTqA, .bxcHYI, .hoUoen {
color: $g7-graphite;
}
// h3s
.espozG {
color: $g8-storm;
}
// Links
.bnFPhO a { color: $b-dodger;
&:visited {color: $b-dodger;}
}
.redoc-json {
font-family: $code !important;
}
// Inline Code
.flfxUM code,
.gDsWLk code,
.kTVySD {
font-family: $code !important;
color: $cp-marguerite;
background: $cp-titan;
border-color: $cp-titan;
}
// Required tags
.jsTAxL {
color: $r-curacao;
}
///////////////////////////// RESPONSE COLOR BLOCKS ////////////////////////////
// Green
.hLVzSF, .fDvFMp {
background-color: rgba($gr-honeydew, .2);
color: $gr-emerald;
}
// Red
.byLrBg {
background-color: rgba($r-curacao, .1);
color: $r-curacao;
}
/////////////////////////////////// LEFT NAV ///////////////////////////////////
// Left nav background
.gZdDsM {
background-color: $g19-ghost;
}
.gpbcFk:hover, .sc-eTuwsz.active {
background-color: $g17-whisper;
}
// List item text
.SmuWE, .gcUzvG, .bbViyS, .sc-hrWEMg label {
font-family: $proxima !important;
}
.fyUykq {
font-weight: $medium;
}
// Request method tags
.cFwMcp {
&.post { background-color: $b-ocean; }
&.get { background-color: $gr-rainforest; }
&.put { background-color: $br-galaxy; }
&.patch { background-color: $y-thunder; color: rgba($g5-pepper, .75);}
&.delete { background-color: $r-curacao; }
}
// Active nav section
.gcUzvG, .iNzLCk:hover {
color: $br-magenta;
}
/////////////////////////////// RIGHT CODE COLUMN //////////////////////////////
// Right column backgrounds
.dtUibw, .fLUKgj {
background-color: $g2-kevlar;
h3,h4,h5,h6 {
font-family: $proxima !important;
font-weight: $medium !important;
}
}
// Code backgrounds
.irpqyy > .react-tabs__tab-panel {
background-color: $g0-obsidian;
}
.dHLKeu, .fVaxnA {
padding-left: 10px;
background-color: $g0-obsidian;
}
// Response code tabs
.irpqyy > ul > li {
background-color: $g0-obsidian;
border-radius: 3px;
&.react-tabs__tab--selected{ color: $br-pulsar;}
&.tab-error { color: $r-fire; }
&.tab-success { color: $gr-viridian; }
}
// Request methods
.bNYCAJ,
.jBjYbV,
.hOczRB,
.fRsrDc,
.hPskZd {
font-family: $proxima;
font-weight: $medium;
letter-spacing: .04em;
border-radius: 3px;
}
.bNYCAJ { background-color: $b-ocean; } /* Post */
.jBjYbV { background-color: $gr-viridian; } /* Get */
.hOczRB { background-color: $br-galaxy; } /* Put */
.fRsrDc { background-color: $y-thunder; color: $g5-pepper; } /* Patch */
.hPskZd { background-color: $r-curacao; } /* Delete */
// Content type block
.gzAoUb {
background-color: $g2-kevlar;
font-family: $proxima;
}
.iENVAs { font-family: $code; }
.dpMbau { font-family: $proxima; }
// Code controls
.fCJmC {
font-family: $proxima;
span { border-radius: 3px; }
}
// Code blocks
.kZHJcC { font-family: $code; }
.jCgylq {
.token.string {
color: $gr-honeydew;
& + a { color: $b-pool; }
}
.token.boolean { color: #f955b0; }
}
// Reusable method badge colors (used by _api-layout.scss .method-badge)
// These follow standard REST API color conventions
$method-get: $gr-rainforest;
$method-post: $b-ocean;
$method-put: $br-galaxy;
$method-patch: $y-thunder;
$method-delete: $r-curacao;

View File

@ -32,7 +32,8 @@
"layouts/v1-overrides",
"layouts/notifications",
"layouts/code-controls",
"layouts/v3-wayfinding";
"layouts/v3-wayfinding",
"layouts/api-layout";
// Import Components
@import "components/influxdb-version-detector",

View File

@ -99,7 +99,7 @@ params:
env: development
environment: development
# API documentation renderer: "scalar" (default) or "rapidoc"
apiRenderer: scalar
apiRenderer: rapidoc
# Configure the server for development
server:

View File

@ -1,20 +1,12 @@
---
title: InfluxDB HTTP API
description: >
The InfluxDB HTTP API for {{% product-name %}} provides a programmatic interface
for interactions with InfluxDB,
including writing, querying, and processing data, and managing an InfluxDB 3
instance.
menu:
influxdb3_core:
parent: Reference
name: InfluxDB HTTP API
weight: 104
influxdb3/core/tags: [api]
source: /shared/influxdb3-api-reference/_index.md
The InfluxDB HTTP API for InfluxDB 3 Core provides a programmatic interface
for interactions with InfluxDB.
# Redirect to the new location
aliases:
- /influxdb3/core/reference/api/
redirect: /influxdb3/core/api/
---
<!--
The content for this page is at
// SOURCE /content/shared/influxdb3-api-reference/_index.md
->
This page has moved to [InfluxDB HTTP API](/influxdb3/core/api/).

View File

@ -1,20 +1,10 @@
---
title: InfluxDB HTTP API
description: >
The InfluxDB HTTP API for {{% product-name %}} provides a programmatic interface
for interactions with InfluxDB,
including writing, querying, and processing data, and managing an InfluxDB 3
instance.
menu:
influxdb3_enterprise:
parent: Reference
name: InfluxDB HTTP API
weight: 104
influxdb3/enterprise/tags: [api]
source: /shared/influxdb3-api-reference/_index.md
The InfluxDB HTTP API for InfluxDB 3 Enterprise provides a programmatic interface
for interactions with InfluxDB.
# Redirect to the new location
redirect: /influxdb3/enterprise/api/
---
<!--
The content for this page is at
// SOURCE /content/shared/influxdb3-api-reference/_index.md
->
This page has moved to [InfluxDB HTTP API](/influxdb3/enterprise/api/).

View File

@ -36,7 +36,7 @@
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.1",
"remark-parse": "^11.0.0",
"typescript": "^5.8.3",
"typescript": "^5.9.3",
"typescript-eslint": "^8.32.1",
"unified": "^11.0.5",
"winston": "^3.16.0"

View File

@ -6033,7 +6033,7 @@ typescript-eslint@^8.32.1:
"@typescript-eslint/typescript-estree" "8.47.0"
"@typescript-eslint/utils" "8.47.0"
typescript@^5.8.3:
typescript@^5.9.3:
version "5.9.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==