docusaurus-openapi-docs icon indicating copy to clipboard operation
docusaurus-openapi-docs copied to clipboard

Bug Report - version 4.4.0 & Docusaurus 3.7.0 issue

Open Devon-White opened this issue 8 months ago • 6 comments

First Issue: Package Manager Issue

Describe the bug

First off, the bug can be experienced here: https://codesandbox.io/p/github/Devon-White/api-plugin-test/main?embed=1

I created a demo that showcases installing the plugin with yarn and npm.

You will notice that when you run build/start on the docs site after the plugin is set up, and your package manager is yarn, that the site will have no (immediately seen) issues. However, running npm test will leave you with a React hook error:

Hook useDoc is called outside the <DocProvider>

This error first occurred to me on my docs site when attempting to upgrade to Docusaurus 3.8, then I was able to replicate it on Docusaurus 3.7 on a fresh docs site/build.

Expected behavior

The package manager shouldn't matter.

Current behavior

NPM tends to not behave well with the plugin.

Possible solution

Avoid NPM.

Steps to reproduce

Follow the README in the linked demo.


Second Issue: Auth doesn't update

As recently discovered, this was an intentional design choice. I suggest a plugin option to turn this behavior off for the example code snippets.

Additional Context

I tried downgrading from React 19 to 18, no luck.

Devon-White avatar May 31 '25 16:05 Devon-White