Skip to content

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

Merged
merged 2 commits into from
Mar 29, 2019
Merged

Docs: Fix the API reference #799

merged 2 commits into from
Mar 29, 2019

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Mar 28, 2019

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.

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.
@nik9000 nik9000 requested a review from delvedor March 28, 2019 21:48
if (!str) return ''
if (str.includes('/5.x/')) {
Copy link
Member Author

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.

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

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.

Copy link
Member

@delvedor delvedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@delvedor delvedor merged commit c92b156 into master Mar 29, 2019
@delvedor delvedor deleted the docs_fix branch March 29, 2019 07:50
delvedor pushed a commit that referenced this pull request Mar 29, 2019
delvedor pushed a commit that referenced this pull request Mar 29, 2019
delvedor pushed a commit that referenced this pull request Mar 29, 2019
@delvedor
Copy link
Member

I've backported the fix to 7.x, 6.x, and 5.x, I've regenerated the reference as well.

@nik9000
Copy link
Member Author

nik9000 commented Mar 29, 2019

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:

INFO:build_docs:Bad cross-document links:
INFO:build_docs:  /tmp/docsbuild/target_repo/html/en/elasticsearch/client/javascript-api/5.x/api-reference.html:
INFO:build_docs:   - en/elasticsearch/plugins/5.x/ingest.html
INFO:build_docs:   - en/elasticsearch/reference/master/search-field-stats.html
INFO:build_docs:   - en/elasticsearch/reference/master/search-percolate.html
INFO:build_docs:  /tmp/docsbuild/target_repo/html/en/elasticsearch/client/javascript-api/6.x/api-reference.html:
INFO:build_docs:   - en/elasticsearch/reference/6.x/secure-settings.html
INFO:build_docs:   - en/elasticsearch/reference/master/watcher-api-restart.html
INFO:build_docs:   - en/migration/current/migration-api-deprecation.html
INFO:build_docs:   - en/monitoring/current/appendix-api-bulk.html

I can look at those in a bit.

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.

2 participants