mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* fix df analytics create route schema definition * add all optional params to schema definiton
This commit is contained in:
parent
2bbf64a79f
commit
c0d064ef78
2 changed files with 10 additions and 2 deletions
|
@ -13,8 +13,16 @@ export const dataAnalyticsJobConfigSchema = {
|
|||
results_field: schema.maybe(schema.string()),
|
||||
}),
|
||||
source: schema.object({
|
||||
index: schema.string(),
|
||||
index: schema.oneOf([schema.string(), schema.arrayOf(schema.string())]),
|
||||
query: schema.maybe(schema.any()),
|
||||
_source: schema.maybe(
|
||||
schema.object({
|
||||
includes: schema.maybe(schema.arrayOf(schema.maybe(schema.string()))),
|
||||
excludes: schema.maybe(schema.arrayOf(schema.maybe(schema.string()))),
|
||||
})
|
||||
),
|
||||
}),
|
||||
allow_lazy_start: schema.maybe(schema.boolean()),
|
||||
analysis: schema.any(),
|
||||
analyzed_fields: schema.any(),
|
||||
model_memory_limit: schema.string(),
|
||||
|
|
|
@ -108,7 +108,7 @@ export function dataFrameAnalyticsRoutes({ xpackMainPlugin, router }: RouteIniti
|
|||
params: schema.object({
|
||||
analyticsId: schema.string(),
|
||||
}),
|
||||
body: schema.object({ ...dataAnalyticsJobConfigSchema }),
|
||||
body: schema.object(dataAnalyticsJobConfigSchema),
|
||||
},
|
||||
},
|
||||
licensePreRoutingFactory(xpackMainPlugin, async (context, request, response) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue