Skip to content

Remove the unused catalog key from the API configuration - #4975

Merged
reakaleek merged 2 commits into
mainfrom
remove-unused-api-cleanup-1cbea937
Nov 20, 2026
Merged

reakaleek merged 2 commits into
mainfrom
remove-unused-api-cleanup-1cbea937

Conversation

@reakaleek

Copy link
Copy Markdown
Member

The catalog: key under an api: entry in docset.yml is removed, along with the deployment pills it fed on the API catalog cards.

Affects: Configuration, API reference

Prompt summary: Delete the unused catalog: setting from the API configuration, and everything that only exists to serve it. The PR must not carry the breaking label.

Why

No production docset sets catalog:. The api: block in elastic/docs-content has no catalog: key, so the pills on the catalog cards and the Deployments: line in the catalog Markdown never showed there. Only the docs/_docset.yml fixtures set it. The key, its parser, its resolver and its rendering were dead weight.

What

The catalog: key is gone from docset.yml

A docset.yml that sets catalog: under an api: entry now gets the standard unknown-key error. That error lists children, product, repository and spec as the valid keys. The parser, the resolver and the ApiCatalogCategory helper are deleted with the key.

Catalog cards lose their deployment pills

The API catalog cards no longer render deployment pills, and the catalog Markdown export drops its Deployments: line. The pills only appeared for an API that set catalog:. Their CSS is removed from api-docs.css and api-reference.css.

Fixtures and docs follow

The docs/_docset.yml fixtures and docs/data/openapi/api-explorer.md no longer mention catalog:. The frozen Golden/Baseline copy of docs/_docset.yml loses the same blocks, so it still loads without errors.

Tests that covered only the key are deleted

The category parsing, resolution and pill tests go. The grouped-catalog test stays, because it also guards the group labels and the attached variant card. It is renamed, and its snapshot loses only the pill. The bad-category diagnostics case is removed, so that snapshot now shows ApiConfigurations: null.

Verify

mise run test
# 9934 passed, 0 failed
mise run lint
mise run serve
# open http://localhost:3000/api/ — ten cards, no deployment pills

No production `docset.yml` sets `catalog:`, so the deployment pills on the API catalog cards and the `Deployments:` line in the catalog Markdown never showed. The key, its parser, its resolver, the pills, their CSS and their tests are removed. A `docset.yml` that still sets `catalog:` now gets the standard unknown-key error.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@reakaleek
reakaleek requested a review from a team as a code owner November 20, 2026 01:42
@reakaleek
reakaleek requested a review from akira28 November 20, 2026 01:42
Comment on lines +32 to +33
single-entry sequence with a required `spec:` and `product:`, and optional `repository:` and
`children:`:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Severity: P3 (Low)

Add an upgrade note telling users to remove the entire catalog: block from existing api: entries. The previous guide included a valid catalog.categories example, and docsets that copied it now fail validation. The new list of supported keys does not tell those users that the block was removed without a replacement.

Generated by Libra. React with 👍 or 👎 to give feedback on this comment.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No change. This page documents the current configuration, so it lists only the keys that work. Removals are announced in the release notes, not in the feature page. No known docset sets catalog:: the api: block in elastic/docs-content has no such key. A docset that does set it fails with Unknown key 'catalog' plus the list of valid keys (children, product, repository, spec), which already says what to remove. An upgrade note would also imply a migration path for a key nobody uses.

Three `using Elastic.Documentation.AppliesTo;` lines, a blank line, an explicit `null` argument and two doc comments still referred to the removed deployment pills.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

@reakaleek
reakaleek merged commit 0cb1aa8 into main Nov 20, 2026
44 checks passed
@reakaleek
reakaleek deleted the remove-unused-api-cleanup-1cbea937 branch November 20, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant