Skip to content

docs: replace openapi-docs plugin with Scalar#411

Draft
adilansari wants to merge 4 commits into
mainfrom
scalar-api-docs
Draft

docs: replace openapi-docs plugin with Scalar#411
adilansari wants to merge 4 commits into
mainfrom
scalar-api-docs

Conversation

@adilansari
Copy link
Copy Markdown
Contributor

@adilansari adilansari commented Apr 7, 2026

Summary

  • Replaced docusaurus-plugin-openapi-docs + docusaurus-theme-openapi-docs with @scalar/docusaurus for the Partner Integrations API reference
  • Removed @redocly/cli and associated linting/config (redocly.yaml)
  • Removed build-time MDX generation pipeline (gen-api-docs, predev/prebuild hooks, lint:apidocs)
  • Scalar renders the API reference client-side from the existing OpenAPI spec at static/api/extensions/v1/api.yaml

What changed

Before After
~60 generated MDX files per build Zero generated files
Custom @theme/ApiItem component Self-contained Scalar plugin
gen-api-docs pre-build step No pre-build step
Redocly lint step Removed (spec validation was optional)
Individual page per endpoint Single interactive API reference page

Test plan

  • npm run build passes cleanly
  • Visit /docs/partner-integrations/api/ and verify the Scalar API reference renders correctly
  • Sidebar link under "Partner Integration Program" navigates to the API reference
  • Broken link in access-control.mdx is fixed
  • npm run lint passes

Note

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/ApiItem doc component) and instead mounts a single Scalar-powered API reference at /partner-integrations/api backed by the existing OpenAPI spec URL.

Fixes a broken docs link in access-control.mdx to 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.

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
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-redirect Ready Ready Preview, Comment Apr 10, 2026 2:53am
tigris-os-docs Ready Ready Preview, Comment Apr 10, 2026 2:53am

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 7, 2026

Greptile Summary

This PR replaces the docusaurus-plugin-openapi-docs build-time MDX generation pipeline with @scalar/docusaurus, which renders the Partner Integrations API reference client-side from the existing static/api/extensions/v1/api.yaml spec. The migration removes ~60 generated files, the predev/prebuild hooks, @redocly/cli, and the lint:apidocs step, and fixes the previously broken link in access-control.mdx.

Confidence Score: 5/5

Safe 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.

Vulnerabilities

No security concerns identified.

Important Files Changed

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)

  1. AGENTS.md, line 38-52 (link)

    P2 Stale build-pipeline references in AGENTS.md

    AGENTS.md was not updated alongside the package.json changes, 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:apidocs does not exist in the updated package.json and will fail with "missing script"
    • Line 64: comment says npm run lint runs (apidocs, code, formatting)lint:apidocs was removed
    • Lines 147-148: "Auto-generated from YAML specs via docusaurus-plugin-openapi-docs. The predev and prebuild scripts 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.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant