-
Notifications
You must be signed in to change notification settings - Fork 79
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
Allow relative links to other parts of the documentation #2758
Comments
I don't think this is exactly correct. cat.aliases would be linking to these docs, respectively: operation-cat-aliases, endpoint-alias Re the link format, I wonder if we can take both the label and the anchor format out of the hands of the author so we can be more specific when referring to endpoints (or, in the case of clients, the equivalent method(?)) using so:
outputs as:
and
outputs as
and in the python client docs as
|
Commenting @swallez proposal here as well for completeness. Instead of using custom tags/anchors in the markdown, we should stick to standard markdown and use links with custom URI schema for linking to endpoints or groups/namespaces: please refer to the [bulk endpoint](endpoint://bulk). This allows us to use regular markdown parsers, to use references in mid-text and as well provides a good way to specify the link and a (fallback-) description for the link at the same time. Similar to this, we could use other URI schemas like |
@shainaraskas I would be fine using the docs description in the client as well to not overcomplicate things. Not sure how it is in other languages, but in .NET I would translate such links to something like this: |
Oh, so you already have namespace information, then. Thanks for the correction! So, merging both proposals would give us:
Despite my preference for API names, I agree that having the same text in the docs and client is fine as long as there's a link in the client. |
Currently, it's grouped by path rather than namespace, which is where we are running into a little friction. a lot of index API endpoints are being grouped under |
I'm not sure what would be the correct name. Those endpoints are in the |
🚀 Feature Proposal
Relative links in the Markdown description should be interpreted as links to endpoint and/or namespaces:
There's a catch with global endpoints, such as search or bulk. Should they be defined as
_global.bulk
or justbulk
? The Python link is https://elasticsearch-py.readthedocs.io/en/v8.14.0/api/elasticsearch.html#elasticsearch.Elasticsearch.bulk.The OpenAPI export would use links that work for the Serverless OpenAPI docs. Currently, there's no grouping, so for like
cat.aliases
it would#endpoint-alias
according to https://github.com/elastic/elasticsearch-specification/pull/2746/files#diff-4f456691f5983599680ab2e423b475e86dc8ea112ef4e7ed91e691cc6c14c567.Using other forms of grouping than namespaces is out of scope.
Motivation
Linking between endpoints is useful. The current use case is linking from the human-friendly cat APIs to the corresponding machine-friendly API.
Example
Please provide an example for how this feature would be used.
Open questions
The text was updated successfully, but these errors were encountered: