Skip to content

Show a readable title for API operations that fall back to the operationId - #4516

Merged
akira28 merged 4 commits into
mainfrom
feature/humanize-operation-id-title
Oct 19, 2026
Merged

akira28 merged 4 commits into
mainfrom
feature/humanize-operation-id-title

Conversation

@akira28

@akira28 akira28 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

When an API operation has no summary, its sidebar title and page title now read "Get Actions Connector Oauth Callback Script" instead of the raw kebab-case operationId.

Affects: API reference

Prompt summary: Follow up on #4515, which made blank summaries fall back to the operationId. The raw id is hard to read in the sidebar, so the fallback should turn it into plain words.

Why

#4515 stops the sidebar link from rendering empty, but the fallback shows get-actions-connector-oauth-callback-script verbatim. Hyphenated ids scan poorly next to titles written as sentences.

What

Readable fallback title

StringExtensions.TitleCaseFromSlug, extracted from the existing file-name title-caser, replaces hyphens and underscores with spaces and capitalises each word. The navigation builder uses it when an operation has no x-api-name and no summary. Operations with a summary are unchanged, and the search export still falls back to the raw operationId.

Verify

dotnet test tests/Elastic.ApiExplorer.Tests/

Check on the preview

…ionId

A sidebar link titled `get-actions-connector-oauth-callback-script` is hard to scan. The fallback now replaces hyphens and underscores with spaces and capitalises the first letter.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@akira28
akira28 requested a review from a team as a code owner October 19, 2026 15:05
@akira28
akira28 requested a review from theletterf October 19, 2026 15:05
Comment thread src/Elastic.ApiExplorer/Navigation/ApiNavigationBuilder.cs Outdated
akira28 and others added 3 commits October 19, 2026 17:08
The navigation title reader already turns kebab-case names into titles. The operationId fallback now shares that code instead of a second helper.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Humanized titles of distinct ids such as `get-script` and `get_script` are equal, so grouping by title could merge two unrelated operations into one page. The grouping key stays the raw id and only the displayed title is humanized.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The helper is general, so it lives next to the other string extensions in Elastic.Documentation instead of in the API explorer's navigation reader. It now uses invariant culture.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview (local build)

Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4516/

@akira28
akira28 merged commit 81f6627 into main Oct 19, 2026
32 checks passed
@akira28
akira28 deleted the feature/humanize-operation-id-title branch October 19, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant