From 5ee21a265e6d4510f19460edfbc806e4abf27d5f Mon Sep 17 00:00:00 2001 From: James Gowdy Date: Thu, 5 Nov 2020 11:06:49 +0000 Subject: [PATCH 1/2] [ML] Updating analyss config schema --- .../ml/server/routes/schemas/anomaly_detectors_schema.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x-pack/plugins/ml/server/routes/schemas/anomaly_detectors_schema.ts b/x-pack/plugins/ml/server/routes/schemas/anomaly_detectors_schema.ts index 5aa7dd326af50..8063366a7c70c 100644 --- a/x-pack/plugins/ml/server/routes/schemas/anomaly_detectors_schema.ts +++ b/x-pack/plugins/ml/server/routes/schemas/anomaly_detectors_schema.ts @@ -82,6 +82,10 @@ export const analysisConfigSchema = schema.object({ detectors: schema.arrayOf(detectorSchema), influencers: schema.arrayOf(schema.maybe(schema.string())), categorization_field_name: schema.maybe(schema.string()), + categorization_analyzer: schema.maybe(schema.any()), + categorization_filters: schema.arrayOf(schema.maybe(schema.string())), + latency: schema.maybe(schema.number()), + multivariate_by_fields: schema.maybe(schema.boolean()), per_partition_categorization: schema.maybe( schema.object({ enabled: schema.boolean(), From ab4dc8f48b1152d4b147bd89f9f6927b24527901 Mon Sep 17 00:00:00 2001 From: James Gowdy Date: Thu, 5 Nov 2020 11:12:43 +0000 Subject: [PATCH 2/2] better schema order --- .../ml/server/routes/schemas/anomaly_detectors_schema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/ml/server/routes/schemas/anomaly_detectors_schema.ts b/x-pack/plugins/ml/server/routes/schemas/anomaly_detectors_schema.ts index 8063366a7c70c..6e203ae18f30f 100644 --- a/x-pack/plugins/ml/server/routes/schemas/anomaly_detectors_schema.ts +++ b/x-pack/plugins/ml/server/routes/schemas/anomaly_detectors_schema.ts @@ -83,7 +83,7 @@ export const analysisConfigSchema = schema.object({ influencers: schema.arrayOf(schema.maybe(schema.string())), categorization_field_name: schema.maybe(schema.string()), categorization_analyzer: schema.maybe(schema.any()), - categorization_filters: schema.arrayOf(schema.maybe(schema.string())), + categorization_filters: schema.maybe(schema.arrayOf(schema.string())), latency: schema.maybe(schema.number()), multivariate_by_fields: schema.maybe(schema.boolean()), per_partition_categorization: schema.maybe(