Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix REST API urls in documentation #970

Merged
merged 8 commits into from
Oct 29, 2024
Merged

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Oct 28, 2024

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
Copy link
Member Author

lhotari commented Oct 28, 2024

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
2 checks passed
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