Skip to content

chore(deps): bump docusaurus-openapi-docs plugin and theme to 4.7.1 - #1135

Closed
dkrizan wants to merge 1 commit into
mainfrom
dkrizan/bump-openapi-docs-4-7-1
Closed

dkrizan wants to merge 1 commit into
mainfrom
dkrizan/bump-openapi-docs-4-7-1

Conversation

@dkrizan

@dkrizan dkrizan commented Sep 2, 2026

Copy link
Copy Markdown
Member

What changed

  • docusaurus-plugin-openapi-docs and docusaurus-theme-openapi-docs go from 4.5.1 to 4.7.1, together.
  • Added path-browserify and a small webpack fallback plugin in docusaurus.config.ts.
  • Regenerated api/ with the 4.7.1 plugin. The spec was not re-downloaded, so the only source of the diff is the plugin version.

Why

The plugin and theme must share a version. Bumping only one of them (#1103, #1122) makes every API reference page crash in the browser while the build stays green.

Theme 4.x pulls postman-code-generators 2.x, which imports path in the browser bundle and breaks the build. Upstream fixes this in 4.8.0 (PaloAltoNetworks/docusaurus-openapi-docs#1353), which is not released yet. The fallback plugin can be removed once we are on 4.8.0.

Replaces #1119. That PR moved to v5 and Docusaurus 3.10, which is a bigger change than we need right now.

About the diff size

The 4.7 plugin writes params, request schemas and status codes into three JSON files per endpoint, next to the .api.mdx. This is not configurable, so any bump past 4.5 produces this shape. Everything under api/ is generated.

Verified

  • npm run build, npm run eslint, npm run prettier-check pass.
  • Served the build and opened /api/revoke-permission and /api/ai-playground-translate in a browser. Parameters, body schema, responses and code samples render, no console errors.

@netlify

netlify Bot commented Sep 2, 2026

Copy link
Copy Markdown

Deploy Preview for tolgee-docs ready!

Name Link
🔨 Latest commit e96a04f
🔍 Latest deploy log https://app.netlify.com/projects/tolgee-docs/deploys/6a9823cbaf08190008d0e8f1
😎 Deploy Preview https://deploy-preview-1135--tolgee-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Bumps both packages together; the plugin and theme must share a version,
otherwise API reference pages crash at runtime (p.getQualifierMessage is not
a function) while the build stays green.

Theme 4.x pulls postman-code-generators 2.x, which needs a browser polyfill
for 'path' that the theme only adds in 4.8.0. Adds path-browserify and a
small webpack fallback plugin until then.

Regenerates api/ with the 4.7.1 plugin, which externalises params, request
schemas and status codes into sidecar JSON files. The extra modules push the
build past the default Node heap limit on Netlify, so netlify.toml raises it.
@dkrizan
dkrizan force-pushed the dkrizan/bump-openapi-docs-4-7-1 branch from 54bab92 to e96a04f Compare September 2, 2026 13:25
@dkrizan

dkrizan commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

The first deploy preview failed with a Node out of memory error. The extra generated files push the build past the default heap limit on Netlify, so I added a netlify.toml that raises it to 4 GB. The preview builds and renders fine now.

@dkrizan

dkrizan commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

Closing. Main has the plugin and theme both on 4.5.1, in sync, and API pages render fine, so there is no bug to fix here. The bump also does not clear the Postman advisories - they are present on 4.7.1 too. Not worth touching 1600 generated files. #1137 stops the Dependabot noise instead.

@dkrizan dkrizan closed this Sep 3, 2026
@dkrizan
dkrizan deleted the dkrizan/bump-openapi-docs-4-7-1 branch September 7, 2026 18:47
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