Correct link for Export button #1046
-
Hi! Thank you for this beautiful product. I am having a hard time configuring the Here's my plugin config: [
'docusaurus-plugin-openapi-docs',
{
id: 'openapi',
docsPluginId: 'classic',
config: {
"balances-api": {
specPath: 'docs/dir-1/dir-2/openapi-specs/balances-api.yaml,
outputDir: 'docs/dir-1/dir-2/endpoints/balances-api',
sidebarOptions: {
groupPathsBy: "tag",
categoryLinkSource: "tag",
},
downloadUrl: '/dir-1/dir-2/openapi-specs/balances-api.yaml'
},
}
}
], When I click Export, the download fails. I also noticed a behavior that could be somehow connected to my issue. If I include the openspec file as a markdown link to a page, the link looks like this:
There's some hash in the title. Is it possible that this hash somehow breaks the Export button? Adding an absolute URL of the file from the deployed website won't work, because the hash is changed everytime I change content of the openspec file. What's the problem with my config and how should I fix it? Any help is insanely appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @dmitriyrotaenko, hard to provide guidance without know the error you're seeing but, FWIW, the Export button requires a URL or link to the OpenAPI spec, not a local file path. |
Beta Was this translation helpful? Give feedback.
That's a URL path. To make it work I placed a copy of the spec under the static directory so that it is served at the / path.