-
Notifications
You must be signed in to change notification settings - Fork 729
Docs: Fix the API reference #799
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
Conversation
Fixes some outbound links in the API reference. These are caused by bad links in Elasticsearch's json spec files. We've filed and issue with Elasticsearch here: elastic/elasticsearch#40596 but for now this works around the bad links.
if (!str) return '' | ||
if (str.includes('/5.x/')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Elasticsearch has all kinds of wrong branches linked and this new replacement forces them all to the "current" branch.
scripts/utils/generateDocs.js
Outdated
"license.post_start_basic": "{ref}/start-basic.html", | ||
"license.post_start_trial": "{ref}/start-trial.html", | ||
"migration.deprecations": "{ref}/migration-api-deprecation.html", | ||
"monitoring.bulk": "{ref}/es-monitoring.html", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these can't be fixed by regex and others would be complex to fix via regex so I do it this way here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I've backported the fix to |
Thanks! This seems to have fixed all of the broken links in 7.x and master. There are a few in 6.x and 5.x:
I can look at those in a bit. |
Fixes some outbound links in the API reference. These are caused by bad
links in Elasticsearch's json spec files. We've filed and issue with
Elasticsearch here:
elastic/elasticsearch#40596
but for now this works around the bad links.