Fix SDK API reference parameter labels
Merged
MO
6mo ago+202+202+012345678901234567890123456789-0-0-0123456789
Summary
- add a Mintlify custom script that rewrites generated SDK API reference schema labels from OpenAPI camelCase to SDK snake_case on Python and Ruby pages
- keep code/pre/input/script/style content untouched so generated code samples stay language-correct
- leave Java/Go/TypeScript routes unchanged for now
Why
Mintlify renders these language-scoped API reference pages from the Stainless documented OpenAPI spec, so visible schema labels use wire-format camelCase even when the Python and Ruby SDK snippets use snake_case.
Validation
pnpm --dir packages/docs exec prettier --check sdk-api-reference-labels.jsnode --check packages/docs/sdk-api-reference-labels.js- confirmed Mintlify embeds root-level docs JS by checking the existing custom script in local/prod HTML and the new script in local HTML
- browser fixture served at
/v3/api-reference/{python,ruby,java}/...: Python/Ruby labels rewrote to snake_case, code blocks stayed camelCase, and Java remained unchanged
Summary by cubic
Fixes mismatched parameter labels on Python and Ruby SDK API reference pages by rewriting OpenAPI camelCase labels to SDK snake_case. Code samples and inputs remain unchanged; other languages are unaffected.
- Bug Fixes
- Added
packages/docs/sdk-api-reference-labels.jsto relabel visible schema fields for Python and Ruby only. - Skips
code,pre,input,script,style, and editable elements to preserve language-correct snippets. - Reacts to SPA route changes and DOM mutations to keep labels consistent.
- Leaves Java/Go/TypeScript pages unchanged.
- Added