Skip to content

Add serverless docURL in schema.json for Console #5188

@lcawl

Description

@lcawl

🚀 Feature Proposal

Per elastic/kibana#163329 the API documentation links that appear in the Dev Tools > Console are derived as follows:

"The script specifically reads the docUrl property from output/schema/schema.json. To support Serverless, we’d also need something like docUrlServerless in that schema so console can consume the correct link. Do you think that would be doable?"

This request does not affect the OpenAPI output, so as a writer my concern is just making it as easy as possible to maintain an accurate list of URLs for each API that exists in either stack or serverless API docs (or both). It seems likely that this will either mean a serverless-specific variation of https://github.com/elastic/elasticsearch-specification/blob/main/specification/_doc_ids/table.csv or else another column in that file to accommodate any doc IDs that have serverless-specific variations (i.e. all the API doc URLs and maybe some of the narrative doc URLs). Alternatively if there's some better way for Console code to pull from the OpenAPI files instead of the schema.json, for example, that's worth pondering as long as we end up with a way for them to resolve the unique set of URLs for each context.

Motivation

The documentation links that exist within the Dev Tools console in Serverless projects are not pointing to the appropriate API docs. Rather, they just go to the landing page for all API docs.
If we get to the point were we have a consolidated OpenAPI document that covers both Stack and Serverless contexts there will no longer be a need for context-aware URLs but AFAIK that's not a near-term goal.

Example

Image

In Serverless projects that link targets https://www.elastic.co/docs/api/ for all Elasticsearch APIs. In the non-Serverless use case that link targets the appropriate page for the API you've selected (e.g. https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions