Skip to content

Fix REST API urls in documentation - #970

Merged
lhotari merged 8 commits into
apache:mainfrom
lhotari:lh-fix-rest-api-urls
Oct 29, 2024
Merged

Fix REST API urls in documentation#970
lhotari merged 8 commits into
apache:mainfrom
lhotari:lh-fix-rest-api-urls

Conversation

@lhotari

@lhotari lhotari commented Oct 28, 2024

Copy link
Copy Markdown
Member

Fixes apache/pulsar#21573

All REST API urls are incorrect in the documentation. This PR fixes the URLs for next, 4.0.x and 3.0.x.

This PR adds a custom Remark plugin that handles logic to lookup the correct URL from the Swagger JSON file so that it's always correct. The plugin is written in Typescript and to do that, the docusaurus config was converted to .ts extension and made compatible.

There's a remaining problem that the Swagger files contain a lot of duplicate operations even after apache/pulsar#19193. The links to Swagger documentation won't work when there are duplicates, which is very common. A replacement will be needed in apache/pulsar for the Swagger generation to fix it. The duplicate operation names required adding ways to find the correct operation in the custom Remark plugin.

This PR replaces the previous draft PR #866.

@lhotari

lhotari commented Oct 28, 2024

Copy link
Copy Markdown
Member Author

some remaining work to fix the issue at

import siteConfig from '../../docusaurus.config';
. I'll fix that.

@lhotari
lhotari merged commit 3e50887 into apache:main Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Doc] all the links to the admin REST API reference doc are broken

1 participant