Skip to content

Document operationId in the Kibana API docs quickstart - #8353

Merged
florent-leborgne merged 1 commit into
mainfrom
flb/kibana-operationid-route-option
Sep 17, 2026
Merged

florent-leborgne merged 1 commit into
mainfrom
flb/kibana-operationid-route-option

Conversation

@florent-leborgne

Copy link
Copy Markdown
Member

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 matching operationId instruction:

  • Set an explicit kebab-case verb-resource ID on public routes.
  • Show operationId at route level in the sample, not inside options, which is where availability and tags live.
  • Link to the Kibana OAS tutorial for the full convention.

Pending links

Generative AI disclosure

  1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
  • Yes
  • No

Tool(s) and model(s) used: Cursor Grok 4.6

Test plan

  • Preview the Code-generated tab on Make your docs changes
  • Confirm the sample places operationId next to summary, with availability still in options

Made with Cursor

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]>
@florent-leborgne
florent-leborgne requested a review from a team as a code owner September 17, 2026 09:34
@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Elastic Docs AI PR menu

Check 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 leemthompo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice, keeping the documentation up to date is essential in today's fast moving environment

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Preview links for changed docs

⏳ Building and deploying preview... View progress

This comment will be updated with preview links when the build is complete.

@github-actions

Copy link
Copy Markdown
Contributor

✅ 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.

Merged via the queue into main with commit 69072b5 Sep 17, 2026
12 of 13 checks passed
@florent-leborgne
florent-leborgne deleted the flb/kibana-operationid-route-option branch September 17, 2026 11:36
github-merge-queue Bot pushed a commit that referenced this pull request Sep 20, 2026
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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Docs review summary

Criteria

  • User focus: Good. The new operationId guidance 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 adjacent availability paragraph). 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 to generating-oas-for-http-apis.md. Wording, the post-foo derivation example, and the create-foo kebab-case example all match the source. The link target kibana://extend/tutorials/generating-oas-for-http-apis.md#set-an-operation-id resolves to a real ##### Set an operation ID heading — 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 orphaned options: {...}, fragment with no enclosing route call; the new router.versioned.post({...}) sample is complete and valid.
  • Applicability: No applies_to changes 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 operationId guidance and contribute-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).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-case verb-resource names.
  • 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.

georgewallace pushed a commit to georgewallace/docs-content that referenced this pull request Sep 23, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants