docs: replace openapi-docs plugin with Scalar#411
Conversation
Replace the build-time OpenAPI MDX generation pipeline with Scalar's client-side API reference renderer. This eliminates the gen-api-docs pre-build step, removes ~60 generated MDX files, and simplifies the build and lint scripts. Assisted-by: Claude Opus 4.6 via Claude Code
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR replaces the Confidence Score: 5/5Safe to merge; the only finding is a P2 cleanup item in AGENTS.md that doesn't affect the deployed site. All code-path changes (config, package.json, sidebar, mdx link) are correct and consistent. The sole finding — stale commands in AGENTS.md — is a documentation-only issue and does not affect build or runtime behaviour. AGENTS.md contains stale references to removed scripts and the old plugin that should be cleaned up.
|
| Filename | Overview |
|---|---|
| docusaurus.config.js | Replaced docusaurus-plugin-openapi-docs with @scalar/docusaurus at route /partner-integrations/api, serving the existing OpenAPI spec from static/api/extensions/v1/api.yaml; configuration looks correct |
| package.json | Added @scalar/docusaurus ^0.8.6, removed docusaurus-plugin-openapi-docs, docusaurus-theme-openapi-docs, @redocly/cli, and related build scripts (gen-api-docs, predev, prebuild, lint:apidocs); lint script simplified correctly |
| sidebars.js | API Reference sidebar entry changed to a direct link at /docs/partner-integrations/api/, correctly pointing at the Scalar plugin route |
| docs/partner-integrations/access-control.mdx | Updated broken link from a generated per-endpoint MDX page to the consolidated Scalar API reference at /docs/partner-integrations/api/ |
| redocly.yaml | Deleted; Redocly CLI and its lint config are no longer needed after the Scalar migration |
Comments Outside Diff (1)
-
AGENTS.md, line 38-52 (link)Stale build-pipeline references in AGENTS.md
AGENTS.mdwas not updated alongside thepackage.jsonchanges, leaving several incorrect instructions that will fail or mislead anyone (including AI agents) who follows them:- Line 38: comment says
npm run dev"includes API docs generation" — no longer true - Line 49: same stale comment on
npm run build - Line 52:
npm run build:apidocsdoes not exist in the updatedpackage.jsonand will fail with "missing script" - Line 64: comment says
npm run lintruns(apidocs, code, formatting)—lint:apidocswas removed - Lines 147-148: "Auto-generated from YAML specs via
docusaurus-plugin-openapi-docs. Thepredevandprebuildscripts run API doc generation automatically." — that plugin and those hooks are gone
These should be updated to reflect the Scalar-based setup with no pre-build generation step.
- Line 38: comment says
Reviews (1): Last reviewed commit: "docs: replace docusaurus-plugin-openapi-..." | Re-trigger Greptile
Reset Docusaurus layout constraints on the Scalar API reference page so the three-panel layout renders at full width without alignment issues. Also hide the redundant Docusaurus footer on the API page and enable dark mode. Assisted-by: Claude Opus 4.6 via Claude Code
Revert custom CSS overrides and configure Scalar properly: - theme: "none" prevents Scalar CSS from conflicting with Docusaurus - hideDarkModeToggle: true (Docusaurus handles dark mode) - withDefaultFonts: false (use site fonts instead of Scalar's) Assisted-by: Claude Opus 4.6 via Claude Code
Summary
docusaurus-plugin-openapi-docs+docusaurus-theme-openapi-docswith@scalar/docusaurusfor the Partner Integrations API reference@redocly/cliand associated linting/config (redocly.yaml)gen-api-docs,predev/prebuildhooks,lint:apidocs)static/api/extensions/v1/api.yamlWhat changed
@theme/ApiItemcomponentgen-api-docspre-build stepTest plan
npm run buildpasses cleanly/docs/partner-integrations/api/and verify the Scalar API reference renders correctlyaccess-control.mdxis fixednpm run lintpassesNote
Medium Risk
Changes the docs site’s API reference renderer and routing, which could break the Partner Integrations API reference page or links if the Scalar config/route is misaligned. No production runtime or data-handling code is affected beyond documentation build/rendering.
Overview
Replaces the Partner Integrations OpenAPI docs pipeline with Scalar. The Docusaurus config drops the
docusaurus-plugin-openapi-docs/theme wiring (including the custom@theme/ApiItemdoc component) and instead mounts a single Scalar-powered API reference at/partner-integrations/apibacked by the existing OpenAPI spec URL.Fixes a broken docs link in
access-control.mdxto point to the new API reference entry route.Reviewed by Cursor Bugbot for commit 08c5eec. Bugbot is set up for automated code reviews on this repo. Configure here.