[Docs][Dashboards API] Add field descriptions to asCodeFilterSchema#263283
Merged
Conversation
94bc877 to
5f6bc0a
Compare
API-agnostic descriptions for the shared filter schema used by the Dashboards API, Lens, Discover, and SLO. Adds missing descriptions to filter condition types and their fields. Improves existing descriptions to follow style conventions. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
5f6bc0a to
a7717bf
Compare
Contributor
|
Pinging @elastic/experience-docs (Team:Docs) |
ThomThomson
approved these changes
Apr 15, 2026
Contributor
ThomThomson
left a comment
There was a problem hiding this comment.
Description changes LGTM! I have one thing to follow up on before merge
2 tasks
…s/filter.ts Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
…back - data_view_id: remove inaccurate 'applies across all indices' claim; the field is a context identifier, not an index scope constraint (lukasolson) - oneOfConditionSchema.value: remove redundant max size from description; maxSize: 10000 already generates maxItems in the OAS output (ThomThomson) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This was referenced Apr 16, 2026
Member
Author
|
@ThomThomson @lukasolson I adjusted the descriptions. Please let me know if you're good with them and I'll merge. Thanks for looking! |
Contributor
💔 Build Failed
Failed CI StepsMetrics [docs]Async chunks
History
|
lukasolson
approved these changes
Apr 16, 2026
ThomThomson
approved these changes
Apr 16, 2026
3 tasks
florent-leborgne
added a commit
that referenced
this pull request
Apr 16, 2026
…dpoints (#262865) ## Summary - Adds cURL and Console code samples (`x-codeSamples`) to all 5 Dashboards API endpoints (POST, GET `/{id}`, PUT `/{id}`, DELETE `/{id}`, GET `_find`) - POST includes two examples: simple dashboard (markdown + 2 metrics + ES|QL line chart) and a structured dashboard with sections and controls - Adds inlined response examples for POST (201), GET (200), PUT (200), and GET `_find` (200) All examples tested against a live Kibana 9.4.0 instance using the Kibana sample logs dataset (`kibana_sample_data_logs`). Follows the grid best practices documented in the tag description (PR #262396). Part of the Dashboards API documentation series: #262396 (merged) → descriptions (#263166, #263281, #263282, #263283) → this PR. ## Preview https://bump.sh/elastic/hub/elastic-apis/doc/dashboards-api-cleanup-intro-and-get-started/group/endpoint-dashboards ## Test plan - [ ] Generate Bump preview and verify code samples appear in upper right dropdown for each endpoint - [ ] Verify response examples appear in the Responses section - [ ] Confirm all JSON in code samples is fully expanded (no inline objects) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Apr 16, 2026
…dpoints (elastic#262865) ## Summary - Adds cURL and Console code samples (`x-codeSamples`) to all 5 Dashboards API endpoints (POST, GET `/{id}`, PUT `/{id}`, DELETE `/{id}`, GET `_find`) - POST includes two examples: simple dashboard (markdown + 2 metrics + ES|QL line chart) and a structured dashboard with sections and controls - Adds inlined response examples for POST (201), GET (200), PUT (200), and GET `_find` (200) All examples tested against a live Kibana 9.4.0 instance using the Kibana sample logs dataset (`kibana_sample_data_logs`). Follows the grid best practices documented in the tag description (PR elastic#262396). Part of the Dashboards API documentation series: elastic#262396 (merged) → descriptions (elastic#263166, elastic#263281, elastic#263282, elastic#263283) → this PR. ## Preview https://bump.sh/elastic/hub/elastic-apis/doc/dashboards-api-cleanup-intro-and-get-started/group/endpoint-dashboards ## Test plan - [ ] Generate Bump preview and verify code samples appear in upper right dropdown for each endpoint - [ ] Verify response examples appear in the Responses section - [ ] Confirm all JSON in code samples is fully expanded (no inline objects) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> (cherry picked from commit f6059b0)
kibanamachine
added a commit
that referenced
this pull request
Apr 16, 2026
…l 5 endpoints (#262865) (#263899) # Backport This will backport the following commits from `main` to `9.4`: - [[Docs][Dashboards API] Add request and response examples for all 5 endpoints (#262865)](#262865) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Florent LB","email":"florent.leborgne@elastic.co"},"sourceCommit":{"committedDate":"2026-04-16T20:16:43Z","message":"[Docs][Dashboards API] Add request and response examples for all 5 endpoints (#262865)\n\n## Summary\n\n- Adds cURL and Console code samples (`x-codeSamples`) to all 5\nDashboards API endpoints (POST, GET `/{id}`, PUT `/{id}`, DELETE\n`/{id}`, GET `_find`)\n- POST includes two examples: simple dashboard (markdown + 2 metrics +\nES|QL line chart) and a structured dashboard with sections and controls\n- Adds inlined response examples for POST (201), GET (200), PUT (200),\nand GET `_find` (200)\n\nAll examples tested against a live Kibana 9.4.0 instance using the\nKibana sample logs dataset (`kibana_sample_data_logs`). Follows the grid\nbest practices documented in the tag description (PR #262396).\n\nPart of the Dashboards API documentation series: #262396 (merged) →\ndescriptions (#263166, #263281, #263282, #263283) → this PR.\n\n## Preview\n\n\nhttps://bump.sh/elastic/hub/elastic-apis/doc/dashboards-api-cleanup-intro-and-get-started/group/endpoint-dashboards\n\n## Test plan\n\n- [ ] Generate Bump preview and verify code samples appear in upper\nright dropdown for each endpoint\n- [ ] Verify response examples appear in the Responses section\n- [ ] Confirm all JSON in code samples is fully expanded (no inline\nobjects)\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\n---------\n\nCo-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>","sha":"f6059b02aca72b0978a1da87a5c74ccb60e26325","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","docs","APIDocs","backport:version","v9.4.0","v9.5.0"],"title":"[Docs][Dashboards API] Add request and response examples for all 5 endpoints","number":262865,"url":"https://github.com/elastic/kibana/pull/262865","mergeCommit":{"message":"[Docs][Dashboards API] Add request and response examples for all 5 endpoints (#262865)\n\n## Summary\n\n- Adds cURL and Console code samples (`x-codeSamples`) to all 5\nDashboards API endpoints (POST, GET `/{id}`, PUT `/{id}`, DELETE\n`/{id}`, GET `_find`)\n- POST includes two examples: simple dashboard (markdown + 2 metrics +\nES|QL line chart) and a structured dashboard with sections and controls\n- Adds inlined response examples for POST (201), GET (200), PUT (200),\nand GET `_find` (200)\n\nAll examples tested against a live Kibana 9.4.0 instance using the\nKibana sample logs dataset (`kibana_sample_data_logs`). Follows the grid\nbest practices documented in the tag description (PR #262396).\n\nPart of the Dashboards API documentation series: #262396 (merged) →\ndescriptions (#263166, #263281, #263282, #263283) → this PR.\n\n## Preview\n\n\nhttps://bump.sh/elastic/hub/elastic-apis/doc/dashboards-api-cleanup-intro-and-get-started/group/endpoint-dashboards\n\n## Test plan\n\n- [ ] Generate Bump preview and verify code samples appear in upper\nright dropdown for each endpoint\n- [ ] Verify response examples appear in the Responses section\n- [ ] Confirm all JSON in code samples is fully expanded (no inline\nobjects)\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\n---------\n\nCo-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>","sha":"f6059b02aca72b0978a1da87a5c74ccb60e26325"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262865","number":262865,"mergeCommit":{"message":"[Docs][Dashboards API] Add request and response examples for all 5 endpoints (#262865)\n\n## Summary\n\n- Adds cURL and Console code samples (`x-codeSamples`) to all 5\nDashboards API endpoints (POST, GET `/{id}`, PUT `/{id}`, DELETE\n`/{id}`, GET `_find`)\n- POST includes two examples: simple dashboard (markdown + 2 metrics +\nES|QL line chart) and a structured dashboard with sections and controls\n- Adds inlined response examples for POST (201), GET (200), PUT (200),\nand GET `_find` (200)\n\nAll examples tested against a live Kibana 9.4.0 instance using the\nKibana sample logs dataset (`kibana_sample_data_logs`). Follows the grid\nbest practices documented in the tag description (PR #262396).\n\nPart of the Dashboards API documentation series: #262396 (merged) →\ndescriptions (#263166, #263281, #263282, #263283) → this PR.\n\n## Preview\n\n\nhttps://bump.sh/elastic/hub/elastic-apis/doc/dashboards-api-cleanup-intro-and-get-started/group/endpoint-dashboards\n\n## Test plan\n\n- [ ] Generate Bump preview and verify code samples appear in upper\nright dropdown for each endpoint\n- [ ] Verify response examples appear in the Responses section\n- [ ] Confirm all JSON in code samples is fully expanded (no inline\nobjects)\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\n---------\n\nCo-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>","sha":"f6059b02aca72b0978a1da87a5c74ccb60e26325"}}]}] BACKPORT--> Co-authored-by: Florent LB <florent.leborgne@elastic.co> Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Starting backport for target branches: 9.4 https://github.com/elastic/kibana/actions/runs/24535965056 |
kibanamachine
added a commit
to kibanamachine/kibana
that referenced
this pull request
Apr 16, 2026
…lastic#263283) ## Summary Adds missing field descriptions to the `asCodeFilterSchema` in the shared `@kbn/as-code-filters-schema` package. ## What was added - **Condition type schemas** (`is`, `is_one_of`, `range`, `exists`): behavioral descriptions explaining what each condition matches. - **`rangeSchema`**: object-level description; periods on boundary fields; improved `format` description. - **`negatePropertySchema`**, **`disabled`**, **`is_multi_index`**: correct `When \`true\`, …` boolean pattern. - **`controlled_by`**: "Identifier of the panel that manages this filter. When set, the filter is treated as owned by that panel." (per ThomThomson). - **`data_view_id`**: "Identifier of the data view used as context for this filter." (corrected per lukasolson — does not scope the query to a specific index). - **`baseConditionSchema.field`**, **`singleConditionSchema.value`**, **`oneOfConditionSchema.value`**: improved descriptions. - **Group filter** (`operator`, `conditions`, `group` object): new descriptions. - **Top-level filter variants** (`asCodeConditionFilterSchema`, `asCodeGroupFilterSchema`, `asCodeDSLFilterSchema`, `asCodeSpatialFilterSchema`): behavioral object-level descriptions. ## API-agnostic All descriptions are generic — no references to dashboards, Lens, Discover, SLO, or any specific API. ## Test plan - [x] ESLint passes - [x] Descriptions render in combined OAS preview on Bump 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Devon Thomson <devon.thomson@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit dd48b1a)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Apr 16, 2026
…hema (#263283) (#263921) # Backport This will backport the following commits from `main` to `9.4`: - [[Docs][Dashboards API] Add field descriptions to asCodeFilterSchema (#263283)](#263283) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Florent LB","email":"florent.leborgne@elastic.co"},"sourceCommit":{"committedDate":"2026-04-16T21:53:33Z","message":"[Docs][Dashboards API] Add field descriptions to asCodeFilterSchema (#263283)\n\n## Summary\n\nAdds missing field descriptions to the `asCodeFilterSchema` in the\nshared `@kbn/as-code-filters-schema` package.\n\n## What was added\n\n- **Condition type schemas** (`is`, `is_one_of`, `range`, `exists`):\nbehavioral descriptions explaining what each condition matches.\n- **`rangeSchema`**: object-level description; periods on boundary\nfields; improved `format` description.\n- **`negatePropertySchema`**, **`disabled`**, **`is_multi_index`**:\ncorrect `When \\`true\\`, …` boolean pattern.\n- **`controlled_by`**: \"Identifier of the panel that manages this\nfilter. When set, the filter is treated as owned by that panel.\" (per\nThomThomson).\n- **`data_view_id`**: \"Identifier of the data view used as context for\nthis filter.\" (corrected per lukasolson — does not scope the query to a\nspecific index).\n- **`baseConditionSchema.field`**, **`singleConditionSchema.value`**,\n**`oneOfConditionSchema.value`**: improved descriptions.\n- **Group filter** (`operator`, `conditions`, `group` object): new\ndescriptions.\n- **Top-level filter variants** (`asCodeConditionFilterSchema`,\n`asCodeGroupFilterSchema`, `asCodeDSLFilterSchema`,\n`asCodeSpatialFilterSchema`): behavioral object-level descriptions.\n\n## API-agnostic\n\nAll descriptions are generic — no references to dashboards, Lens,\nDiscover, SLO, or any specific API.\n\n## Test plan\n\n- [x] ESLint passes\n- [x] Descriptions render in combined OAS preview on Bump\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\n---------\n\nCo-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>\nCo-authored-by: Devon Thomson <devon.thomson@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"dd48b1a9df7433daade6cc070a5bb1a85c53f698","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","docs","APIDocs","backport:version","v9.4.0","v9.5.0"],"title":"[Docs][Dashboards API] Add field descriptions to asCodeFilterSchema","number":263283,"url":"https://github.com/elastic/kibana/pull/263283","mergeCommit":{"message":"[Docs][Dashboards API] Add field descriptions to asCodeFilterSchema (#263283)\n\n## Summary\n\nAdds missing field descriptions to the `asCodeFilterSchema` in the\nshared `@kbn/as-code-filters-schema` package.\n\n## What was added\n\n- **Condition type schemas** (`is`, `is_one_of`, `range`, `exists`):\nbehavioral descriptions explaining what each condition matches.\n- **`rangeSchema`**: object-level description; periods on boundary\nfields; improved `format` description.\n- **`negatePropertySchema`**, **`disabled`**, **`is_multi_index`**:\ncorrect `When \\`true\\`, …` boolean pattern.\n- **`controlled_by`**: \"Identifier of the panel that manages this\nfilter. When set, the filter is treated as owned by that panel.\" (per\nThomThomson).\n- **`data_view_id`**: \"Identifier of the data view used as context for\nthis filter.\" (corrected per lukasolson — does not scope the query to a\nspecific index).\n- **`baseConditionSchema.field`**, **`singleConditionSchema.value`**,\n**`oneOfConditionSchema.value`**: improved descriptions.\n- **Group filter** (`operator`, `conditions`, `group` object): new\ndescriptions.\n- **Top-level filter variants** (`asCodeConditionFilterSchema`,\n`asCodeGroupFilterSchema`, `asCodeDSLFilterSchema`,\n`asCodeSpatialFilterSchema`): behavioral object-level descriptions.\n\n## API-agnostic\n\nAll descriptions are generic — no references to dashboards, Lens,\nDiscover, SLO, or any specific API.\n\n## Test plan\n\n- [x] ESLint passes\n- [x] Descriptions render in combined OAS preview on Bump\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\n---------\n\nCo-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>\nCo-authored-by: Devon Thomson <devon.thomson@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"dd48b1a9df7433daade6cc070a5bb1a85c53f698"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/263283","number":263283,"mergeCommit":{"message":"[Docs][Dashboards API] Add field descriptions to asCodeFilterSchema (#263283)\n\n## Summary\n\nAdds missing field descriptions to the `asCodeFilterSchema` in the\nshared `@kbn/as-code-filters-schema` package.\n\n## What was added\n\n- **Condition type schemas** (`is`, `is_one_of`, `range`, `exists`):\nbehavioral descriptions explaining what each condition matches.\n- **`rangeSchema`**: object-level description; periods on boundary\nfields; improved `format` description.\n- **`negatePropertySchema`**, **`disabled`**, **`is_multi_index`**:\ncorrect `When \\`true\\`, …` boolean pattern.\n- **`controlled_by`**: \"Identifier of the panel that manages this\nfilter. When set, the filter is treated as owned by that panel.\" (per\nThomThomson).\n- **`data_view_id`**: \"Identifier of the data view used as context for\nthis filter.\" (corrected per lukasolson — does not scope the query to a\nspecific index).\n- **`baseConditionSchema.field`**, **`singleConditionSchema.value`**,\n**`oneOfConditionSchema.value`**: improved descriptions.\n- **Group filter** (`operator`, `conditions`, `group` object): new\ndescriptions.\n- **Top-level filter variants** (`asCodeConditionFilterSchema`,\n`asCodeGroupFilterSchema`, `asCodeDSLFilterSchema`,\n`asCodeSpatialFilterSchema`): behavioral object-level descriptions.\n\n## API-agnostic\n\nAll descriptions are generic — no references to dashboards, Lens,\nDiscover, SLO, or any specific API.\n\n## Test plan\n\n- [x] ESLint passes\n- [x] Descriptions render in combined OAS preview on Bump\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\n---------\n\nCo-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>\nCo-authored-by: Devon Thomson <devon.thomson@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"dd48b1a9df7433daade6cc070a5bb1a85c53f698"}}]}] BACKPORT--> Co-authored-by: Florent LB <florent.leborgne@elastic.co> Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
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.
Summary
Adds missing field descriptions to the
asCodeFilterSchemain the shared@kbn/as-code-filters-schemapackage.What was added
is,is_one_of,range,exists): behavioral descriptions explaining what each condition matches.rangeSchema: object-level description; periods on boundary fields; improvedformatdescription.negatePropertySchema,disabled,is_multi_index: correctWhen \true`, …` boolean pattern.controlled_by: "Identifier of the panel that manages this filter. When set, the filter is treated as owned by that panel." (per ThomThomson).data_view_id: "Identifier of the data view used as context for this filter." (corrected per lukasolson — does not scope the query to a specific index).baseConditionSchema.field,singleConditionSchema.value,oneOfConditionSchema.value: improved descriptions.operator,conditions,groupobject): new descriptions.asCodeConditionFilterSchema,asCodeGroupFilterSchema,asCodeDSLFilterSchema,asCodeSpatialFilterSchema): behavioral object-level descriptions.API-agnostic
All descriptions are generic — no references to dashboards, Lens, Discover, SLO, or any specific API.
Test plan
🤖 Generated with Claude Code