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 6002bb218c41b..22c3d94dfb29e 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 @@ -35,10 +35,13 @@ const customUrlSchema = { time_range: schema.maybe(schema.any()), }; -const customSettingsSchema = schema.object({ - created_by: schema.maybe(schema.string()), - custom_urls: schema.maybe(schema.arrayOf(schema.maybe(schema.object({ ...customUrlSchema })))), -}); +const customSettingsSchema = schema.object( + { + created_by: schema.maybe(schema.string()), + custom_urls: schema.maybe(schema.arrayOf(schema.maybe(schema.object({ ...customUrlSchema })))), + }, + { unknowns: 'allow' } // Create / Update job API allows other fields to be added to custom_settings. +); export const anomalyDetectionUpdateJobSchema = { description: schema.maybe(schema.string()),