Repository navigation
Document operationId in the Kibana API docs quickstart - #8353
Conversation
Code-generated public routes should set a kebab-case verb-resource ID, because SDK and CLI generators use it as the method and command name. Co-authored-by: Cursor <[email protected]>
Elastic Docs AI PR menuCheck the box to run an AI review for this pull request.
Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team. |
leemthompo
left a comment
There was a problem hiding this comment.
Nice, keeping the documentation up to date is essential in today's fast moving environment
🔍 Preview links for changed docs⏳ Building and deploying preview... View progress This comment will be updated with preview links when the build is complete. |
✅ Elastic Docs Style Checker (Vale)No issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
Every `/docs-review` run on this repo is currently failing, and no review is being posted. Five PRs hit it in the last few minutes (#8355, #8353, #8351, #8349, #8348). The failure is in the `activation` job, at the step `Validate ANTHROPIC_API_KEY secret`. `activation` fails, `agent` is skipped, and the run reports a green-ish mixed state while doing nothing. ## Cause The docs review workflow moved from the Copilot engine to the Claude engine via OpenRouter. Copilot ran on `copilot-requests` credits and needed no secret, so this caller never had a `secrets:` block. The Claude engine reads `${{ secrets.OPENROUTER_API_KEY }}` inside its engine env, and a reusable workflow does not inherit caller secrets unless they are passed explicitly. So the secret resolved to empty, and validation failed before the agent started. ## Fix Pass the secret through: ```yaml secrets: OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} ``` `OPENROUTER_API_KEY` already exists as a repo secret here, and `v1` declares it under `on.workflow_call.secrets`, so explicit pass-through is valid. No secret needs creating. ## Verifying Re-trigger the docs review checkbox on any open PR. The `activation` job should succeed and `agent` should run instead of being skipped. Worth checking the same block in any other repo that calls `gh-aw-docs-review.lock.yml@v1` — the same caller change is needed wherever the workflow was previously running on Copilot. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01H3vJ764kbRQMFqEtZxh42b
There was a problem hiding this comment.
Docs review summary
Criteria
- User focus: Good. The new
operationIdguidance is placed exactly where the reader needs it — right before the code sample it describes, in the existing "bolded lead-in" pattern the page already uses (matches the adjacentavailabilityparagraph). It states the "why" (SDK/CLI generators derive method/command names from this ID), not just the "what." - Technical accuracy: Verified against the merged companion Kibana PR (
elastic/kibana#291664, merged 2026-09-17) that added the corresponding section togenerating-oas-for-http-apis.md. Wording, thepost-fooderivation example, and thecreate-fookebab-case example all match the source. The link targetkibana://extend/tutorials/generating-oas-for-http-apis.md#set-an-operation-idresolves to a real##### Set an operation IDheading — the "pending links" caveat in the PR description is resolved now that the Kibana PR merged. The updated code sample also fixes a real defect: the pre-existing snippet was a syntactically orphanedoptions: {...},fragment with no enclosing route call; the newrouter.versioned.post({...})sample is complete and valid. - Applicability: No
applies_tochanges were made, and none is needed — this is workflow guidance for docs contributors, not a version- or deployment-scoped product behavior. - Maintainability: One high-severity contradiction found — see inline comment. The new content correctly avoids duplicating the full naming rationale by linking out to the canonical Kibana tutorial section rather than re-explaining it here.
- Language: Minor — see Nits.
- Style: No issues. Active voice, present tense, bold lead-in consistent with the surrounding paragraph, descriptive link text, correct cross-repo link syntax.
- Issue satisfaction: Satisfied. Both linked issues/PRs (
elastic/kibana#284350,elastic/kibana#291664) are merged, and this page's instructions match the shipped convention and the companion tutorial content.
Nits
- Line 83 uses "SDK" and "CLI" without spelling either out on first use anywhere on this page (checked the whole file). Minor given the technical, docs-contributor audience, but the style guide calls for spelling out abbreviations on first use.
Notes
- The one inline comment flags a real conflict between this page's kebab-case
operationIdguidance andcontribute-docs/api-docs/checklist.md's "using camelCase" bullet, which is a cross-product checklist this page's own "Code-generated" tab points contributors to. Evidence (the linked tutorial, the actual shipped operation IDs, and published API operation slugs) all point toward kebab-case being correct and the checklist being stale — flagged as "Review existing" per the contradiction-check skill, with an SME asked to confirm before either page is edited.
Generated by Docs review agent for #8353 · claude · sonnet · 128.9 AIC · ⊞ 19K
| :sync: code-generated | ||
| Edit the TypeScript route definitions in your plugin code. Add JSDoc comments, request/response schemas, and examples as needed, per the [checklist](checklist.md). | ||
|
|
||
| **Set an explicit `operationId`** on public routes. SDK and CLI generators use this ID as the method and command name. If you omit it, the generator derives a name from the method and path, such as `post-foo`. Prefer kebab-case `verb-resource` names such as `create-foo`. For details, refer to [Set an operation ID](kibana://extend/tutorials/generating-oas-for-http-apis.md#set-an-operation-id). |
There was a problem hiding this comment.
This kebab-case verb-resource guidance conflicts with the cross-product checklist at contribute-docs/api-docs/checklist.md:16, which says: "Define unique operation identifiers using camelCase."
Evidence points to the checklist entry being the outdated one, not this new text:
- The merged Kibana tutorial this section links to (
generating-oas-for-http-apis.md#set-an-operation-id) also specifies kebab-caseverb-resourcenames. - The actual operation IDs shipped alongside that change (
create-dashboard,search-dashboards,get-dashboard,upsert-dashboard,delete-dashboard) are kebab-case, not camelCase. - Published Kibana API operation slugs (e.g.
get-alerting-v2-action-policies-id,cat-aliases) follow the same hyphenated pattern.
Align checklist.md's operation-identifier bullet with the kebab-case convention described here, or add a note explaining when camelCase still applies (if it does for another workflow). Confirm with an SME before changing either page, since the checklist covers both Elasticsearch and Kibana API docs contributions.
…8403) ## Summary Follow-up to elastic#8353 and the post-merge review on that PR, which flagged kebab-case Kibana `operationId` guidance against this checklist's camelCase bullet. The checklist is shared by Elasticsearch, Kibana, Logstash, and other API docs workflows. Replacing camelCase with kebab-case would still be wrong for some of them: - New Kibana public routes and Elasticsearch OpenAPI IDs use kebab-case (`create-dashboard`, `async-search-get`). - Older Kibana YAML APIs, Logstash, and Cloud still use camelCase (`createCaseDefaultSpace`, `nodeInfoOS`). This PR drops the casing from the checklist. The linked [Add operation identifiers](https://www.elastic.co/docs/contribute-docs/api-docs/organize-annotate#add-operation-identifiers) page already requires unique, URL-safe, consistent IDs. Kibana's kebab-case `verb-resource` rule stays on the [Kibana API docs quickstart](https://www.elastic.co/docs/contribute-docs/api-docs/kibana-api-docs-quickstart). ## Test plan - [ ] Preview the checklist bullet. Confirm it still links to Add operation identifiers and no longer names a case convention. ## Generative AI disclosure 1. Did you use a generative AI (GenAI) tool to assist in creating this contribution? - [x] Yes - [ ] No Tool(s) and model(s) used: Cursor Grok 4.6 Made with [Cursor](https://cursor.com) Co-authored-by: Cursor <[email protected]>
Summary
Companion to elastic/kibana#291664 and elastic/kibana#284350.
The Kibana API docs quickstart is where docs contributors edit TypeScript routes. The Code-generated tab already requires
availability. This PR adds the matchingoperationIdinstruction:verb-resourceID on public routes.operationIdat route level in the sample, not insideoptions, which is whereavailabilityand tags live.Pending links
Generative AI disclosure
Tool(s) and model(s) used: Cursor Grok 4.6
Test plan
operationIdnext tosummary, withavailabilitystill inoptionsMade with Cursor