Skip to content

Commit 73d5740

Browse files
kibanamachinetobio
andauthored
[9.0] Integers should be type:integer (elastic#233253) (elastic#233596)
# Backport This will backport the following commits from `main` to `9.0`: - [Integers should be type:integer (elastic#233253)](elastic#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 (elastic#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 (elastic#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 (elastic#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 dd9addf commit 73d5740

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
@@ -59116,15 +59116,13 @@ components:
5911659116
type: number
5911759117
category_1_count:
5911859118
description: The number of risk input documents that contributed to the Category 1 score (`category_1_score`).
59119-
format: integer
59120-
type: number
59119+
type: integer
5912159120
category_1_score:
5912259121
description: The contribution of Category 1 to the overall risk score (`calculated_score`). Category 1 contains Detection Engine Alerts.
5912359122
format: double
5912459123
type: number
5912559124
category_2_count:
59126-
format: integer
59127-
type: number
59125+
type: integer
5912859126
category_2_score:
5912959127
format: double
5913059128
type: number

oas_docs/output/kibana.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66162,15 +66162,13 @@ components:
6616266162
type: number
6616366163
category_1_count:
6616466164
description: The number of risk input documents that contributed to the Category 1 score (`category_1_score`).
66165-
format: integer
66166-
type: number
66165+
type: integer
6616766166
category_1_score:
6616866167
description: The contribution of Category 1 to the overall risk score (`calculated_score`). Category 1 contains Detection Engine Alerts.
6616966168
format: double
6617066169
type: number
6617166170
category_2_count:
66172-
format: integer
66173-
type: number
66171+
type: integer
6617466172
category_2_score:
6617566173
format: double
6617666174
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
@@ -1150,17 +1150,15 @@ components:
11501150
description: >-
11511151
The number of risk input documents that contributed to the Category
11521152
1 score (`category_1_score`).
1153-
format: integer
1154-
type: number
1153+
type: integer
11551154
category_1_score:
11561155
description: >-
11571156
The contribution of Category 1 to the overall risk score
11581157
(`calculated_score`). Category 1 contains Detection Engine Alerts.
11591158
format: double
11601159
type: number
11611160
category_2_count:
1162-
format: integer
1163-
type: number
1161+
type: integer
11641162
category_2_score:
11651163
format: double
11661164
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
@@ -1150,17 +1150,15 @@ components:
11501150
description: >-
11511151
The number of risk input documents that contributed to the Category
11521152
1 score (`category_1_score`).
1153-
format: integer
1154-
type: number
1153+
type: integer
11551154
category_1_score:
11561155
description: >-
11571156
The contribution of Category 1 to the overall risk score
11581157
(`calculated_score`). Category 1 contains Detection Engine Alerts.
11591158
format: double
11601159
type: number
11611160
category_2_count:
1162-
format: integer
1163-
type: number
1161+
type: integer
11641162
category_2_score:
11651163
format: double
11661164
type: number

0 commit comments

Comments
 (0)