Skip to content

[9.4] [Docs][Dashboards API] Add field descriptions to asCodeFilterSchema (#263283)#263921

Merged
kibanamachine merged 1 commit into
elastic:9.4from
kibanamachine:backport/9.4/pr-263283
Apr 16, 2026
Merged

[9.4] [Docs][Dashboards API] Add field descriptions to asCodeFilterSchema (#263283)#263921
kibanamachine merged 1 commit into
elastic:9.4from
kibanamachine:backport/9.4/pr-263283

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.4:

Questions ?

Please refer to the Backport tool documentation

…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)
@kibanamachine kibanamachine merged commit 71411f1 into elastic:9.4 Apr 16, 2026
19 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lens 2.0MB 2.0MB +1.6KB

cc @florent-leborgne

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants