Skip to content

Commit

Permalink
[ML] Allow edits to jobs with additional custom_settings props (elast…
Browse files Browse the repository at this point in the history
…ic#61067)

* [ML] Allow edits to jobs with additional custom_settings props

* [ML] Minor text edit

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
peteharverson and elasticmachine authored Mar 24, 2020
1 parent 17db8a6 commit a68eaf2
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down

0 comments on commit a68eaf2

Please sign in to comment.