[Docs][Visualizations API] Add endpoint and field descriptions#263151
Merged
Conversation
…ptions - Add operation descriptions and since: '9.4.0' to all 5 route files (create, search, get, update, delete) - Add field descriptions to search query params (fields, search_fields, query, page, per_page) and response meta (page, per_page, total) - Add id description to lensResponseItemSchema - Add overwrite description to lensCreateRequestQuerySchema (inline) - Add id descriptions to delete/get/update params schemas - Add field descriptions to asCodeMetaSchema in @kbn/as-code-shared-schemas (created_at, created_by, managed, owner, updated_at, updated_by, version) so all API consumers benefit Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Instead of inlining schemas to add descriptions, add descriptions directly to the shared schemas in @kbn/content-management-utils so all API consumers benefit (Lens, Dashboards, SavedSearch, DataViews, Maps, etc.): - searchOptionsSchemas.fields, .searchFields, .page, .perPage - createOptionsSchemas.overwrite Restore the original import structure in schema/search.ts and schema/create.ts — both files now reference the shared schemas again with no structural changes. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…estore import Add generic 'Unique identifier.' description to savedObjectSchema.id in @kbn/content-management-utils so all content management consumers benefit. Revert schema/common.ts to reference savedObjectProps.id again — no net import changes from main. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Pinging @elastic/experience-docs (Team:Docs) |
nreese
approved these changes
Apr 14, 2026
Contributor
nreese
left a comment
There was a problem hiding this comment.
kibana-presentation changes LGTM
code review only
davismcphee
approved these changes
Apr 15, 2026
This was referenced Apr 15, 2026
…n changes Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
markov00
approved these changes
Apr 20, 2026
Contributor
💛 Build succeeded, but was flaky
Failed CI Steps
Test Failures
Metrics [docs]
History
|
Contributor
|
Starting backport for target branches: 9.4 https://github.com/elastic/kibana/actions/runs/24669765217 |
kibanamachine
added a commit
to kibanamachine/kibana
that referenced
this pull request
Apr 20, 2026
…ic#263151) ## Summary Part of the Lens Visualizations API documentation series. **Series:** - PR 1/4: Introduction and get-started overlay — merged (elastic#262595) - **PR 2/4 (this PR):** Endpoint descriptions and field descriptions - PR 3/4: Request code samples and response examples (elastic#262874) - Viz PR B: Chart type schema descriptions (elastic#263571) ## What changed ### Route files — all 5 endpoints Added `description` strings and `since: '9.4.0'` to all five routes. ### `schema/search.ts`, `schema/create.ts`, `schema/common.ts` - `query` search param: description added inline - `id` path param on delete/get/update: improved description - `total` response field: description added inline ### `schema/delete.ts`, `schema/get.ts`, `schema/update.ts` Updated `id` description to reference where the ID comes from. ### Shared package: `@kbn/as-code-shared-schemas` Added `meta.description` to all 7 fields of `asCodeMetaSchema` (`created_at`, `created_by`, `managed`, `owner`, `updated_at`, `updated_by`, `version`). > **Note:** descriptions added to `@kbn/content-management-utils` (`savedObjectSchema.id`, `searchOptionsSchemas.*`, `createOptionsSchemas.overwrite`) were **reverted** per feedback from ThomThomson — content management schemas are not part of the public as-code API surface. Descriptions for `fields`, `search_fields`, `overwrite`, and `id` will be handled via overlay fallback. ## Open items - Two CodeQL findings on `kbn-content-management-utils/src/schema.ts` (unbounded arrays) — pre-existing, not introduced by this PR - davismcphee's architectural question answered: content-management-utils changes reverted 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit c2bbbc4)
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 20, 2026
…263151) (#264423) # Backport This will backport the following commits from `main` to `9.4`: - [[Docs][Visualizations API] Add endpoint and field descriptions (#263151)](#263151) <!--- 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-20T13:39:35Z","message":"[Docs][Visualizations API] Add endpoint and field descriptions (#263151)\n\n## Summary\n\nPart of the Lens Visualizations API documentation series.\n\n**Series:**\n- PR 1/4: Introduction and get-started overlay — merged (#262595)\n- **PR 2/4 (this PR):** Endpoint descriptions and field descriptions\n- PR 3/4: Request code samples and response examples (#262874)\n- Viz PR B: Chart type schema descriptions (#263571)\n\n## What changed\n\n### Route files — all 5 endpoints\nAdded `description` strings and `since: '9.4.0'` to all five routes.\n\n### `schema/search.ts`, `schema/create.ts`, `schema/common.ts`\n- `query` search param: description added inline\n- `id` path param on delete/get/update: improved description\n- `total` response field: description added inline\n\n### `schema/delete.ts`, `schema/get.ts`, `schema/update.ts`\nUpdated `id` description to reference where the ID comes from.\n\n### Shared package: `@kbn/as-code-shared-schemas`\nAdded `meta.description` to all 7 fields of `asCodeMetaSchema`\n(`created_at`, `created_by`, `managed`, `owner`, `updated_at`,\n`updated_by`, `version`).\n\n> **Note:** descriptions added to `@kbn/content-management-utils`\n(`savedObjectSchema.id`, `searchOptionsSchemas.*`,\n`createOptionsSchemas.overwrite`) were **reverted** per feedback from\nThomThomson — content management schemas are not part of the public\nas-code API surface. Descriptions for `fields`, `search_fields`,\n`overwrite`, and `id` will be handled via overlay fallback.\n\n## Open items\n- Two CodeQL findings on `kbn-content-management-utils/src/schema.ts`\n(unbounded arrays) — pre-existing, not introduced by this PR\n- davismcphee's architectural question answered:\ncontent-management-utils changes reverted\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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"c2bbbc461b994391921301fb2960e7a0b5df929b","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][Visualizations API] Add endpoint and field descriptions","number":263151,"url":"https://github.com/elastic/kibana/pull/263151","mergeCommit":{"message":"[Docs][Visualizations API] Add endpoint and field descriptions (#263151)\n\n## Summary\n\nPart of the Lens Visualizations API documentation series.\n\n**Series:**\n- PR 1/4: Introduction and get-started overlay — merged (#262595)\n- **PR 2/4 (this PR):** Endpoint descriptions and field descriptions\n- PR 3/4: Request code samples and response examples (#262874)\n- Viz PR B: Chart type schema descriptions (#263571)\n\n## What changed\n\n### Route files — all 5 endpoints\nAdded `description` strings and `since: '9.4.0'` to all five routes.\n\n### `schema/search.ts`, `schema/create.ts`, `schema/common.ts`\n- `query` search param: description added inline\n- `id` path param on delete/get/update: improved description\n- `total` response field: description added inline\n\n### `schema/delete.ts`, `schema/get.ts`, `schema/update.ts`\nUpdated `id` description to reference where the ID comes from.\n\n### Shared package: `@kbn/as-code-shared-schemas`\nAdded `meta.description` to all 7 fields of `asCodeMetaSchema`\n(`created_at`, `created_by`, `managed`, `owner`, `updated_at`,\n`updated_by`, `version`).\n\n> **Note:** descriptions added to `@kbn/content-management-utils`\n(`savedObjectSchema.id`, `searchOptionsSchemas.*`,\n`createOptionsSchemas.overwrite`) were **reverted** per feedback from\nThomThomson — content management schemas are not part of the public\nas-code API surface. Descriptions for `fields`, `search_fields`,\n`overwrite`, and `id` will be handled via overlay fallback.\n\n## Open items\n- Two CodeQL findings on `kbn-content-management-utils/src/schema.ts`\n(unbounded arrays) — pre-existing, not introduced by this PR\n- davismcphee's architectural question answered:\ncontent-management-utils changes reverted\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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"c2bbbc461b994391921301fb2960e7a0b5df929b"}},"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/263151","number":263151,"mergeCommit":{"message":"[Docs][Visualizations API] Add endpoint and field descriptions (#263151)\n\n## Summary\n\nPart of the Lens Visualizations API documentation series.\n\n**Series:**\n- PR 1/4: Introduction and get-started overlay — merged (#262595)\n- **PR 2/4 (this PR):** Endpoint descriptions and field descriptions\n- PR 3/4: Request code samples and response examples (#262874)\n- Viz PR B: Chart type schema descriptions (#263571)\n\n## What changed\n\n### Route files — all 5 endpoints\nAdded `description` strings and `since: '9.4.0'` to all five routes.\n\n### `schema/search.ts`, `schema/create.ts`, `schema/common.ts`\n- `query` search param: description added inline\n- `id` path param on delete/get/update: improved description\n- `total` response field: description added inline\n\n### `schema/delete.ts`, `schema/get.ts`, `schema/update.ts`\nUpdated `id` description to reference where the ID comes from.\n\n### Shared package: `@kbn/as-code-shared-schemas`\nAdded `meta.description` to all 7 fields of `asCodeMetaSchema`\n(`created_at`, `created_by`, `managed`, `owner`, `updated_at`,\n`updated_by`, `version`).\n\n> **Note:** descriptions added to `@kbn/content-management-utils`\n(`savedObjectSchema.id`, `searchOptionsSchemas.*`,\n`createOptionsSchemas.overwrite`) were **reverted** per feedback from\nThomThomson — content management schemas are not part of the public\nas-code API surface. Descriptions for `fields`, `search_fields`,\n`overwrite`, and `id` will be handled via overlay fallback.\n\n## Open items\n- Two CodeQL findings on `kbn-content-management-utils/src/schema.ts`\n(unbounded arrays) — pre-existing, not introduced by this PR\n- davismcphee's architectural question answered:\ncontent-management-utils changes reverted\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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"c2bbbc461b994391921301fb2960e7a0b5df929b"}}]}] BACKPORT--> Co-authored-by: Florent LB <florent.leborgne@elastic.co> Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
florent-leborgne
added a commit
that referenced
this pull request
Apr 28, 2026
…pes (Viz PR B) (#263571) ## Summary Part of the Lens Visualizations API documentation series (Viz PR B). Adds descriptions to all 12 chart type schemas and all supporting schemas. **Series:** - PR 1/4: Introduction overlay — merged (#262595) - PR 2/4: Endpoint + field descriptions (#263151) - PR 3/4: Code samples + response examples (#262874) - **Viz PR B (this PR):** Schema descriptions for all 12 chart types + supporting schemas ## Approach Descriptions only — no schema types, validation constraints, or field names changed. Rebased onto main to pick up #262927 (styling alignment restructuring). ## What changed ### Operation schemas - `metric_ops.ts`: object-level descriptions on `metricOperationDefinitionSchema`, `fieldMetricOrFormulaOperationDefinitionSchema` - `bucket_ops.ts`: descriptions on `bucketOperationDefinitionSchema` and all bucket operation fields; `When \`true\`,` pattern applied throughout - `shared.ts`: fixed tautological `collapseBySchema` description; fixed `ignore_global_filters` and `sampling` descriptions; fixed `axisTitleSchemaProps` ### Chart schemas — all 12 types Object-level descriptions on DSL variant, ES|QL variant, and union schema for every chart type. "DSL data source" consistently replaced with "data view". Additional field-level descriptions on chart-specific fields (shape, alignment, icon, palette, etc.). ### Supporting schemas - `color.ts`: descriptions on all color variant schemas; full palette name list on all palette fields with correct defaults per context - `format.ts`: descriptions on all format variant schemas - `filter.ts`: descriptions on `filterSchema` and `filterWithLabelSchema` - `index.ts`: description on `lensApiStateSchema` top-level union - `xy.ts`: `aggregate_first` description fixed ### Style quality pass - All descriptions standardised to noun phrases (no verb-first descriptions) - `A/An` added to concrete countable noun descriptions - Dropped valid enum values restored (alignment, slice label position, donut hole size) - Redundant numeric min/max removed from description text (auto-rendered by OAS) - `may` → `can` throughout ### Reverted Object-level descriptions added to `@kbn/as-code-data-views-schema` (`dataViewReferenceSchema`, `dataViewSpecSchema`, `runtimeFieldSchema`, etc.) were **reverted** — object-level `meta.description` on schema objects in shared packages does not surface in the OAS output. Will use overlay fallback. ## Test plan - [x] Rebased onto main; conflicts from #262927 resolved - [x] Descriptions verified 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: florent-leborgne <10208282+florent-leborgne@users.noreply.github.com> Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
kibanamachine
added a commit
that referenced
this pull request
Apr 28, 2026
…art types (Viz PR B) (#263571) (#265997) # Backport This will backport the following commits from `main` to `9.4`: - [[Docs][Visualizations API] Add schema descriptions to all 12 chart types (Viz PR B) (#263571)](#263571) <!--- 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-28T09:59:20Z","message":"[Docs][Visualizations API] Add schema descriptions to all 12 chart types (Viz PR B) (#263571)\n\n## Summary\n\nPart of the Lens Visualizations API documentation series (Viz PR B).\nAdds descriptions to all 12 chart type schemas and all supporting\nschemas.\n\n**Series:**\n- PR 1/4: Introduction overlay — merged (#262595)\n- PR 2/4: Endpoint + field descriptions (#263151)\n- PR 3/4: Code samples + response examples (#262874)\n- **Viz PR B (this PR):** Schema descriptions for all 12 chart types +\nsupporting schemas\n\n## Approach\n\nDescriptions only — no schema types, validation constraints, or field\nnames changed. Rebased onto main to pick up #262927 (styling alignment\nrestructuring).\n\n## What changed\n\n### Operation schemas\n- `metric_ops.ts`: object-level descriptions on\n`metricOperationDefinitionSchema`,\n`fieldMetricOrFormulaOperationDefinitionSchema`\n- `bucket_ops.ts`: descriptions on `bucketOperationDefinitionSchema` and\nall bucket operation fields; `When \\`true\\`,` pattern applied throughout\n- `shared.ts`: fixed tautological `collapseBySchema` description; fixed\n`ignore_global_filters` and `sampling` descriptions; fixed\n`axisTitleSchemaProps`\n\n### Chart schemas — all 12 types\nObject-level descriptions on DSL variant, ES|QL variant, and union\nschema for every chart type. \"DSL data source\" consistently replaced\nwith \"data view\". Additional field-level descriptions on chart-specific\nfields (shape, alignment, icon, palette, etc.).\n\n### Supporting schemas\n- `color.ts`: descriptions on all color variant schemas; full palette\nname list on all palette fields with correct defaults per context\n- `format.ts`: descriptions on all format variant schemas\n- `filter.ts`: descriptions on `filterSchema` and\n`filterWithLabelSchema`\n- `index.ts`: description on `lensApiStateSchema` top-level union\n- `xy.ts`: `aggregate_first` description fixed\n\n### Style quality pass\n- All descriptions standardised to noun phrases (no verb-first\ndescriptions)\n- `A/An` added to concrete countable noun descriptions\n- Dropped valid enum values restored (alignment, slice label position,\ndonut hole size)\n- Redundant numeric min/max removed from description text (auto-rendered\nby OAS)\n- `may` → `can` throughout\n\n### Reverted\nObject-level descriptions added to `@kbn/as-code-data-views-schema`\n(`dataViewReferenceSchema`, `dataViewSpecSchema`, `runtimeFieldSchema`,\netc.) were **reverted** — object-level `meta.description` on schema\nobjects in shared packages does not surface in the OAS output. Will use\noverlay fallback.\n\n## Test plan\n- [x] Rebased onto main; conflicts from #262927 resolved\n- [x] Descriptions verified 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>\nCo-authored-by: florent-leborgne <10208282+florent-leborgne@users.noreply.github.com>\nCo-authored-by: Marco Vettorello <vettorello.marco@gmail.com>","sha":"187a8e0c74b9cd78b0b963e3abf92211bc0a7939","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][Visualizations API] Add schema descriptions to all 12 chart types (Viz PR B)","number":263571,"url":"https://github.com/elastic/kibana/pull/263571","mergeCommit":{"message":"[Docs][Visualizations API] Add schema descriptions to all 12 chart types (Viz PR B) (#263571)\n\n## Summary\n\nPart of the Lens Visualizations API documentation series (Viz PR B).\nAdds descriptions to all 12 chart type schemas and all supporting\nschemas.\n\n**Series:**\n- PR 1/4: Introduction overlay — merged (#262595)\n- PR 2/4: Endpoint + field descriptions (#263151)\n- PR 3/4: Code samples + response examples (#262874)\n- **Viz PR B (this PR):** Schema descriptions for all 12 chart types +\nsupporting schemas\n\n## Approach\n\nDescriptions only — no schema types, validation constraints, or field\nnames changed. Rebased onto main to pick up #262927 (styling alignment\nrestructuring).\n\n## What changed\n\n### Operation schemas\n- `metric_ops.ts`: object-level descriptions on\n`metricOperationDefinitionSchema`,\n`fieldMetricOrFormulaOperationDefinitionSchema`\n- `bucket_ops.ts`: descriptions on `bucketOperationDefinitionSchema` and\nall bucket operation fields; `When \\`true\\`,` pattern applied throughout\n- `shared.ts`: fixed tautological `collapseBySchema` description; fixed\n`ignore_global_filters` and `sampling` descriptions; fixed\n`axisTitleSchemaProps`\n\n### Chart schemas — all 12 types\nObject-level descriptions on DSL variant, ES|QL variant, and union\nschema for every chart type. \"DSL data source\" consistently replaced\nwith \"data view\". Additional field-level descriptions on chart-specific\nfields (shape, alignment, icon, palette, etc.).\n\n### Supporting schemas\n- `color.ts`: descriptions on all color variant schemas; full palette\nname list on all palette fields with correct defaults per context\n- `format.ts`: descriptions on all format variant schemas\n- `filter.ts`: descriptions on `filterSchema` and\n`filterWithLabelSchema`\n- `index.ts`: description on `lensApiStateSchema` top-level union\n- `xy.ts`: `aggregate_first` description fixed\n\n### Style quality pass\n- All descriptions standardised to noun phrases (no verb-first\ndescriptions)\n- `A/An` added to concrete countable noun descriptions\n- Dropped valid enum values restored (alignment, slice label position,\ndonut hole size)\n- Redundant numeric min/max removed from description text (auto-rendered\nby OAS)\n- `may` → `can` throughout\n\n### Reverted\nObject-level descriptions added to `@kbn/as-code-data-views-schema`\n(`dataViewReferenceSchema`, `dataViewSpecSchema`, `runtimeFieldSchema`,\netc.) were **reverted** — object-level `meta.description` on schema\nobjects in shared packages does not surface in the OAS output. Will use\noverlay fallback.\n\n## Test plan\n- [x] Rebased onto main; conflicts from #262927 resolved\n- [x] Descriptions verified 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>\nCo-authored-by: florent-leborgne <10208282+florent-leborgne@users.noreply.github.com>\nCo-authored-by: Marco Vettorello <vettorello.marco@gmail.com>","sha":"187a8e0c74b9cd78b0b963e3abf92211bc0a7939"}},"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/263571","number":263571,"mergeCommit":{"message":"[Docs][Visualizations API] Add schema descriptions to all 12 chart types (Viz PR B) (#263571)\n\n## Summary\n\nPart of the Lens Visualizations API documentation series (Viz PR B).\nAdds descriptions to all 12 chart type schemas and all supporting\nschemas.\n\n**Series:**\n- PR 1/4: Introduction overlay — merged (#262595)\n- PR 2/4: Endpoint + field descriptions (#263151)\n- PR 3/4: Code samples + response examples (#262874)\n- **Viz PR B (this PR):** Schema descriptions for all 12 chart types +\nsupporting schemas\n\n## Approach\n\nDescriptions only — no schema types, validation constraints, or field\nnames changed. Rebased onto main to pick up #262927 (styling alignment\nrestructuring).\n\n## What changed\n\n### Operation schemas\n- `metric_ops.ts`: object-level descriptions on\n`metricOperationDefinitionSchema`,\n`fieldMetricOrFormulaOperationDefinitionSchema`\n- `bucket_ops.ts`: descriptions on `bucketOperationDefinitionSchema` and\nall bucket operation fields; `When \\`true\\`,` pattern applied throughout\n- `shared.ts`: fixed tautological `collapseBySchema` description; fixed\n`ignore_global_filters` and `sampling` descriptions; fixed\n`axisTitleSchemaProps`\n\n### Chart schemas — all 12 types\nObject-level descriptions on DSL variant, ES|QL variant, and union\nschema for every chart type. \"DSL data source\" consistently replaced\nwith \"data view\". Additional field-level descriptions on chart-specific\nfields (shape, alignment, icon, palette, etc.).\n\n### Supporting schemas\n- `color.ts`: descriptions on all color variant schemas; full palette\nname list on all palette fields with correct defaults per context\n- `format.ts`: descriptions on all format variant schemas\n- `filter.ts`: descriptions on `filterSchema` and\n`filterWithLabelSchema`\n- `index.ts`: description on `lensApiStateSchema` top-level union\n- `xy.ts`: `aggregate_first` description fixed\n\n### Style quality pass\n- All descriptions standardised to noun phrases (no verb-first\ndescriptions)\n- `A/An` added to concrete countable noun descriptions\n- Dropped valid enum values restored (alignment, slice label position,\ndonut hole size)\n- Redundant numeric min/max removed from description text (auto-rendered\nby OAS)\n- `may` → `can` throughout\n\n### Reverted\nObject-level descriptions added to `@kbn/as-code-data-views-schema`\n(`dataViewReferenceSchema`, `dataViewSpecSchema`, `runtimeFieldSchema`,\netc.) were **reverted** — object-level `meta.description` on schema\nobjects in shared packages does not surface in the OAS output. Will use\noverlay fallback.\n\n## Test plan\n- [x] Rebased onto main; conflicts from #262927 resolved\n- [x] Descriptions verified 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>\nCo-authored-by: florent-leborgne <10208282+florent-leborgne@users.noreply.github.com>\nCo-authored-by: Marco Vettorello <vettorello.marco@gmail.com>","sha":"187a8e0c74b9cd78b0b963e3abf92211bc0a7939"}}]}] 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: florent-leborgne <10208282+florent-leborgne@users.noreply.github.com> Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
smith
pushed a commit
to smith/kibana
that referenced
this pull request
Apr 28, 2026
…pes (Viz PR B) (elastic#263571) ## Summary Part of the Lens Visualizations API documentation series (Viz PR B). Adds descriptions to all 12 chart type schemas and all supporting schemas. **Series:** - PR 1/4: Introduction overlay — merged (elastic#262595) - PR 2/4: Endpoint + field descriptions (elastic#263151) - PR 3/4: Code samples + response examples (elastic#262874) - **Viz PR B (this PR):** Schema descriptions for all 12 chart types + supporting schemas ## Approach Descriptions only — no schema types, validation constraints, or field names changed. Rebased onto main to pick up elastic#262927 (styling alignment restructuring). ## What changed ### Operation schemas - `metric_ops.ts`: object-level descriptions on `metricOperationDefinitionSchema`, `fieldMetricOrFormulaOperationDefinitionSchema` - `bucket_ops.ts`: descriptions on `bucketOperationDefinitionSchema` and all bucket operation fields; `When \`true\`,` pattern applied throughout - `shared.ts`: fixed tautological `collapseBySchema` description; fixed `ignore_global_filters` and `sampling` descriptions; fixed `axisTitleSchemaProps` ### Chart schemas — all 12 types Object-level descriptions on DSL variant, ES|QL variant, and union schema for every chart type. "DSL data source" consistently replaced with "data view". Additional field-level descriptions on chart-specific fields (shape, alignment, icon, palette, etc.). ### Supporting schemas - `color.ts`: descriptions on all color variant schemas; full palette name list on all palette fields with correct defaults per context - `format.ts`: descriptions on all format variant schemas - `filter.ts`: descriptions on `filterSchema` and `filterWithLabelSchema` - `index.ts`: description on `lensApiStateSchema` top-level union - `xy.ts`: `aggregate_first` description fixed ### Style quality pass - All descriptions standardised to noun phrases (no verb-first descriptions) - `A/An` added to concrete countable noun descriptions - Dropped valid enum values restored (alignment, slice label position, donut hole size) - Redundant numeric min/max removed from description text (auto-rendered by OAS) - `may` → `can` throughout ### Reverted Object-level descriptions added to `@kbn/as-code-data-views-schema` (`dataViewReferenceSchema`, `dataViewSpecSchema`, `runtimeFieldSchema`, etc.) were **reverted** — object-level `meta.description` on schema objects in shared packages does not surface in the OAS output. Will use overlay fallback. ## Test plan - [x] Rebased onto main; conflicts from elastic#262927 resolved - [x] Descriptions verified 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: florent-leborgne <10208282+florent-leborgne@users.noreply.github.com> Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
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
Part of the Lens Visualizations API documentation series.
Series:
What changed
Route files — all 5 endpoints
Added
descriptionstrings andsince: '9.4.0'to all five routes.schema/search.ts,schema/create.ts,schema/common.tsquerysearch param: description added inlineidpath param on delete/get/update: improved descriptiontotalresponse field: description added inlineschema/delete.ts,schema/get.ts,schema/update.tsUpdated
iddescription to reference where the ID comes from.Shared package:
@kbn/as-code-shared-schemasAdded
meta.descriptionto all 7 fields ofasCodeMetaSchema(created_at,created_by,managed,owner,updated_at,updated_by,version).Open items
kbn-content-management-utils/src/schema.ts(unbounded arrays) — pre-existing, not introduced by this PR🤖 Generated with Claude Code