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

2.0.0-beta.3 - Authorization link not respecting docs.routeBasePath

Open IanVS opened this issue 2 years ago • 1 comments

Describe the bug

I have the following config:

presets: [
    [
      'classic',
      ({
        docs: {
          routeBasePath: '/', // Serve the docs at the site's root

Which means that my docs live at the root of the site, not under /docs.

But when I click on the new authorization link, I get a 404 because it includes /docs in the URL.

image

Expected behavior

The link should be constructed correctly, using docs.routeBasePath.

Current behavior

404

Possible solution

Steps to reproduce

Screenshots

Context

Your Environment

  • Version used: 2.0.0-beta.3
  • Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3):
  • Operating System and version (desktop or mobile):
  • Link to your project:

IanVS avatar May 09 '23 13:05 IanVS

Hi @IanVS, the base path is supposed to be resolved via the docsPluginId option and should factor in routeBasePath when constructing those links. Can you share your plugin config?

sserrata avatar May 09 '23 14:05 sserrata