elastic / elastic/docs-builder
OpenAPI explorer: native `toc` navigation for API intro pages (follow-up to #3144)
- Dominant language
- C#
- Stars
- 24
- Forks
- 44
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 146
Description
## Context
PR [#3144](https://github.com/elastic/docs-builder/pull/3144) landed a **stop-gap** configuration: intro/outro Markdown around a spec via `docset.yml` `api:` sequence entries (`file` / `spec` / `file`). That unblocks work **before** the full OpenAPI explorer release.
This issue tracks the **intended** design: make those pages part of **`toc` navigation natively** instead of only the top-level `api:` sequence.
## Desired configuration (from review)
Instead of only:
```yaml
api:
kibana:
- file: kibana-intro.md
- spec: kibana-openapi.json
- file: kibana-additional-notes.md
```
Support something like:
```yaml
toc:
toc: api
```
**`api/toc.yml`** (illustrative):
```yaml
toc:
- spec:
name: kibana
file: kibana-openapi.json
children:
- file: index.md
- file: intro.md
- file: troubleshooting.md
- folder: tagGroup
children:
- file: index.md
- folder: tag
children:
- file: operation.md
```
## Goals
- Allow injecting / prepending content at:
- Main landing: `/docs/api/kibana/index.md`
- Tag group landing: `/docs/api/kibana/tagGroupX/index.md`
- Tag landing: `/docs/api/kibana/tagGroupX/tagY/index.md`
- Operation landing: `/docs/api/kibana/tagGroupX/tagY/operation.md` (as appropriate for the final URL scheme)
## Constraints (from original request)
- **Simplicity:** only **additional** pages at the root; folders **must** map to tag groups or tag names from the spec.
- **No outro pages** in this design (intro-style injection only).
## Timeline
- Do this as a **follow-up** after the stop-gap in #3144.
- Complete **before** the OpenAPI explorer is **fully released** so navigation feels first-class, not bolted on.
## References
- Request for changes review on #3144 (2026-04-21) — same content as above.
Contributor guide
Assessment
This issue has not been assessed yet.