Skip to content

Commit c7ef6cf

Browse files
tobiokibanamachine
andauthored
Integers should be type:integer (elastic#233253)
## Summary From the [spec](https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers) `type:number` defines floating point numbers optionally with `type: float32|float64`. Integer fields should be `type:integer` where `format` can be one of `int32` or `int64` if required. Related to elastic#228077 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. --------- Co-authored-by: kibanamachine <[email protected]>
1 parent cab0937 commit c7ef6cf

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
@@ -70742,15 +70742,13 @@ components:
7074270742
type: number
7074370743
category_1_count:
7074470744
description: The number of risk input documents that contributed to the Category 1 score (`category_1_score`).
70745-
format: integer
70746-
type: number
70745+
type: integer
7074770746
category_1_score:
7074870747
description: The contribution of Category 1 to the overall risk score (`calculated_score`). Category 1 contains Detection Engine Alerts.
7074970748
format: double
7075070749
type: number
7075170750
category_2_count:
70752-
format: integer
70753-
type: number
70751+
type: integer
7075470752
category_2_score:
7075570753
format: double
7075670754
type: number

oas_docs/output/kibana.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83481,15 +83481,13 @@ components:
8348183481
type: number
8348283482
category_1_count:
8348383483
description: The number of risk input documents that contributed to the Category 1 score (`category_1_score`).
83484-
format: integer
83485-
type: number
83484+
type: integer
8348683485
category_1_score:
8348783486
description: The contribution of Category 1 to the overall risk score (`calculated_score`). Category 1 contains Detection Engine Alerts.
8348883487
format: double
8348983488
type: number
8349083489
category_2_count:
83491-
format: integer
83492-
type: number
83490+
type: integer
8349383491
category_2_score:
8349483492
format: double
8349583493
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
@@ -1591,17 +1591,15 @@ components:
15911591
description: >-
15921592
The number of risk input documents that contributed to the Category
15931593
1 score (`category_1_score`).
1594-
format: integer
1595-
type: number
1594+
type: integer
15961595
category_1_score:
15971596
description: >-
15981597
The contribution of Category 1 to the overall risk score
15991598
(`calculated_score`). Category 1 contains Detection Engine Alerts.
16001599
format: double
16011600
type: number
16021601
category_2_count:
1603-
format: integer
1604-
type: number
1602+
type: integer
16051603
category_2_score:
16061604
format: double
16071605
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
@@ -1591,17 +1591,15 @@ components:
15911591
description: >-
15921592
The number of risk input documents that contributed to the Category
15931593
1 score (`category_1_score`).
1594-
format: integer
1595-
type: number
1594+
type: integer
15961595
category_1_score:
15971596
description: >-
15981597
The contribution of Category 1 to the overall risk score
15991598
(`calculated_score`). Category 1 contains Detection Engine Alerts.
16001599
format: double
16011600
type: number
16021601
category_2_count:
1603-
format: integer
1604-
type: number
1602+
type: integer
16051603
category_2_score:
16061604
format: double
16071605
type: number

0 commit comments

Comments
 (0)