Skip to content

Commit fe5b7f2

Browse files
kibanamachinetobio
andauthored
[9.1] Integers should be type:integer (#233253) (#233597)
# Backport This will backport the following commits from `main` to `9.1`: - [Integers should be type:integer (#233253)](#233253) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Toby Brain","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-09-01T06:38:16Z","message":"Integers should be type:integer (#233253)\n\n## Summary\n\nFrom the\n[spec](https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers)\n`type:number` defines floating point numbers optionally with `type:\nfloat32|float64`. Integer fields should be `type:integer` where `format`\ncan be one of `int32` or `int64` if required.\n\nRelated to https://github.com/elastic/kibana/issues/228077\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [x] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"c7ef6cfb87d3e591ff1c0c6ebab1af0f96926117","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","v9.2.0"],"title":"Integers should be type:integer","number":233253,"url":"https://github.com/elastic/kibana/pull/233253","mergeCommit":{"message":"Integers should be type:integer (#233253)\n\n## Summary\n\nFrom the\n[spec](https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers)\n`type:number` defines floating point numbers optionally with `type:\nfloat32|float64`. Integer fields should be `type:integer` where `format`\ncan be one of `int32` or `int64` if required.\n\nRelated to https://github.com/elastic/kibana/issues/228077\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [x] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"c7ef6cfb87d3e591ff1c0c6ebab1af0f96926117"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/233253","number":233253,"mergeCommit":{"message":"Integers should be type:integer (#233253)\n\n## Summary\n\nFrom the\n[spec](https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers)\n`type:number` defines floating point numbers optionally with `type:\nfloat32|float64`. Integer fields should be `type:integer` where `format`\ncan be one of `int32` or `int64` if required.\n\nRelated to https://github.com/elastic/kibana/issues/228077\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [x] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"c7ef6cfb87d3e591ff1c0c6ebab1af0f96926117"}}]}] BACKPORT--> Co-authored-by: Toby Brain <[email protected]>
1 parent 0683a70 commit fe5b7f2

File tree

6 files changed

+12
-22
lines changed

6 files changed

+12
-22
lines changed

oas_docs/output/kibana.serverless.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67081,15 +67081,13 @@ components:
6708167081
type: number
6708267082
category_1_count:
6708367083
description: The number of risk input documents that contributed to the Category 1 score (`category_1_score`).
67084-
format: integer
67085-
type: number
67084+
type: integer
6708667085
category_1_score:
6708767086
description: The contribution of Category 1 to the overall risk score (`calculated_score`). Category 1 contains Detection Engine Alerts.
6708867087
format: double
6708967088
type: number
6709067089
category_2_count:
67091-
format: integer
67092-
type: number
67090+
type: integer
6709367091
category_2_score:
6709467092
format: double
6709567093
type: number

oas_docs/output/kibana.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76644,15 +76644,13 @@ components:
7664476644
type: number
7664576645
category_1_count:
7664676646
description: The number of risk input documents that contributed to the Category 1 score (`category_1_score`).
76647-
format: integer
76648-
type: number
76647+
type: integer
7664976648
category_1_score:
7665076649
description: The contribution of Category 1 to the overall risk score (`calculated_score`). Category 1 contains Detection Engine Alerts.
7665176650
format: double
7665276651
type: number
7665376652
category_2_count:
76654-
format: integer
76655-
type: number
76653+
type: integer
7665676654
category_2_score:
7665776655
format: double
7665876656
type: number

x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/common/common.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@ export const EntityRiskScoreRecord = z.object({
151151
/**
152152
* The number of risk input documents that contributed to the Category 1 score (`category_1_score`).
153153
*/
154-
category_1_count: z.number(),
154+
category_1_count: z.number().int(),
155155
/**
156156
* A list of the highest-risk documents contributing to this risk score. Useful for investigative purposes.
157157
*/
158158
inputs: z.array(RiskScoreInput),
159159
category_2_score: z.number().optional(),
160-
category_2_count: z.number().optional(),
160+
category_2_count: z.number().int().optional(),
161161
notes: z.array(z.string()),
162162
criticality_modifier: z.number().optional(),
163163
criticality_level: AssetCriticalityLevel.optional(),

x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/common/common.schema.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,7 @@ components:
203203
format: double
204204
description: The contribution of Category 1 to the overall risk score (`calculated_score`). Category 1 contains Detection Engine Alerts.
205205
category_1_count:
206-
type: number
207-
format: integer
206+
type: integer
208207
description: The number of risk input documents that contributed to the Category 1 score (`category_1_score`).
209208
inputs:
210209
type: array
@@ -215,8 +214,7 @@ components:
215214
type: number
216215
format: double
217216
category_2_count:
218-
type: number
219-
format: integer
217+
type: integer
220218
notes:
221219
type: array
222220
items:

x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,17 +1550,15 @@ components:
15501550
description: >-
15511551
The number of risk input documents that contributed to the Category
15521552
1 score (`category_1_score`).
1553-
format: integer
1554-
type: number
1553+
type: integer
15551554
category_1_score:
15561555
description: >-
15571556
The contribution of Category 1 to the overall risk score
15581557
(`calculated_score`). Category 1 contains Detection Engine Alerts.
15591558
format: double
15601559
type: number
15611560
category_2_count:
1562-
format: integer
1563-
type: number
1561+
type: integer
15641562
category_2_score:
15651563
format: double
15661564
type: number

x-pack/solutions/security/plugins/security_solution/docs/openapi/serverless/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,17 +1550,15 @@ components:
15501550
description: >-
15511551
The number of risk input documents that contributed to the Category
15521552
1 score (`category_1_score`).
1553-
format: integer
1554-
type: number
1553+
type: integer
15551554
category_1_score:
15561555
description: >-
15571556
The contribution of Category 1 to the overall risk score
15581557
(`calculated_score`). Category 1 contains Detection Engine Alerts.
15591558
format: double
15601559
type: number
15611560
category_2_count:
1562-
format: integer
1563-
type: number
1561+
type: integer
15641562
category_2_score:
15651563
format: double
15661564
type: number

0 commit comments

Comments
 (0)