PaloAltoNetworks / PaloAltoNetworks/docusaurus-openapi-docs
Flag --all-versions not working
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 315
- Avg merge
- 7d 5h
- Merged PRs (30d)
- 7
Description
Describe the bug
--all-versions flag apparently does nothing
Expected behavior
It should create documentation for all versions defined in the config
Current behavior
It just creates the documentation for the current version
Steps to reproduce
- Define versions in plugin config (docusaurus.config.ts)
...
plugins: [
[
'docusaurus-plugin-openapi-docs',
{
id: 'api',
docsPluginId: 'classic',
config: {
coolapi_versioned: {
specPath: 'src/assets/swagger-v2.yaml',
outputDir: 'docs/coolapi_versioned',
sidebarOptions: {
groupPathsBy: 'tag',
categoryLinkSource: 'tag'
},
version: '2.0',
label: 'v2.0',
baseUrl: '/coolapi_versioned/swagger-coolapi-yaml',
versions: {
'1.0': {
specPath: 'src/assets/swagger-v1.yaml',
outputDir: 'docs/coolapi_versioned/1.0',
label: 'v1.0',
baseUrl: '/coolapi_versioned/1.0/swagger-coolapi-yaml' // Leading slash is important
}
}
} satisfies OpenApiPlugin.Options
}
}
]
],
...
- Run
npm run docusaurus gen-api-docs all --all-versions
Screenshots
--all-versions flag seems to be ignored
Context
I try to build all the versions just running one command, but is not working.
Your Environment
- Version used: 4.3.3
- Environment name and version: Chrome 132.0.6834.160, node.js v20.18.0
- Operating System and version: Windows 10 Enterprise
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with docusaurus.config.ts and the npm run docusaurus gen-api-docs all --all-versions entry point, tracing how the --all-versions option is handled for versioned plugin configuration. Done means the command generates documentation for both the configured 2.0 and 1.0 versions instead of only the current version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, typescript
- Domain
- cli, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100