From 263c534429b1798fe456e02fac09aa2ba2df36f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Thu, 10 Aug 2023 17:27:30 +0200 Subject: [PATCH] [Telemetry Schema Validation] Allow `null` on `string` (#163499) --- .../src/schema_ftr_validations/schema_to_config_schema.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/kbn-telemetry-tools/src/schema_ftr_validations/schema_to_config_schema.ts b/packages/kbn-telemetry-tools/src/schema_ftr_validations/schema_to_config_schema.ts index b80a42e101284..5c12c199bbe6d 100644 --- a/packages/kbn-telemetry-tools/src/schema_ftr_validations/schema_to_config_schema.ts +++ b/packages/kbn-telemetry-tools/src/schema_ftr_validations/schema_to_config_schema.ts @@ -59,7 +59,8 @@ function valueSchemaToConfigSchema(value: TelemetrySchemaValue): Type { case 'keyword': case 'text': case 'date': - return schema.string(); + // Some plugins return `null` when there is no value to report + return schema.oneOf([schema.string(), schema.literal(null)]); case 'byte': case 'double': case 'float':