Skip to content

Send API request button is not visible when serverl url is absent but proxy-URL is present #1245

@AD-ZERO

Description

@AD-ZERO

Describe the bug

Send API request button is not visible when serverl url is absent in openapi.json but Proxy-URL is provided in docusaurus config
In general if serverl url is absent in openapi.json send api request button is hidden or not visible

Expected behavior

Send Api Request button should be visble when serverl-url is absent in openapi.json,
Expected Behaviour:-
if server-url and proxy-url is not present , Send Api Request button should be visible with call to / and if
server-url and proxy-url is present, Proxy-URL should be default host and other servel URL should be in the list

Current behavior

if server-url is not present , Send API request button is not visible

Steps to reproduce

Config:-

['docusaurus-plugin-openapi-docs',
      {
        id: "api", // plugin id
        docsPluginId: "classic", // configured for preset-classic
        config: {
          ApiV1Spec: {
            specPath: "openapi.json",
            outputDir: "docs/apiv1",
            sidebarOptions: {
              groupPathsBy: "tag",
            },
            proxy: "https://example.com",
          } satisfies OpenApiPlugin.Options,
        }
      },
    ],]

any openapi json with no server-url entru

Your Environment

  "dependencies": {
    "@docusaurus/core": "^3.9.2",
    "@docusaurus/plugin-client-redirects": "^3.9.2",
    "@docusaurus/preset-classic": "^3.9.2",
    "@mdx-js/react": "^3.0.0",
    "@scalar/docusaurus": "^0.7.21",
    "clsx": "^2.0.0",
    "docusaurus-plugin-openapi-docs": "^4.5.1",
    "docusaurus-theme-openapi-docs": "^4.5.1",
    "prism-react-renderer": "^2.3.0",
    "react": "^18.0.0",
    "react-dom": "^18.0.0"
  },
  "devDependencies": {
    "@docusaurus/module-type-aliases": "^3.9.2",
    "@docusaurus/tsconfig": "^3.9.2",
    "@docusaurus/types": "^3.9.2",
    "typescript": "~5.6.2"
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions