Repository navigation
Show a readable title for API operations that fall back to the operationId - #4516
Merged
Merged
Conversation
…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>
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>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4516/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-scriptverbatim. 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 nox-api-nameand 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
Get Actions Connector Oauth Callback Script(until the Kibana summary lands).