mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[ML] Fix runtime mappings for runtimeField with optional script field (#91634)
This commit is contained in:
parent
9eb69cf71a
commit
7a75e19c3e
3 changed files with 10 additions and 8 deletions
|
@ -113,7 +113,7 @@ type RuntimeType = typeof RUNTIME_FIELD_TYPES[number];
|
|||
|
||||
export interface RuntimeField {
|
||||
type: RuntimeType;
|
||||
script:
|
||||
script?:
|
||||
| string
|
||||
| {
|
||||
source: string;
|
||||
|
|
|
@ -76,12 +76,14 @@ export const runtimeMappingsSchema = schema.maybe(
|
|||
schema.literal('ip'),
|
||||
schema.literal('boolean'),
|
||||
]),
|
||||
script: schema.oneOf([
|
||||
schema.string(),
|
||||
schema.object({
|
||||
source: schema.string(),
|
||||
}),
|
||||
]),
|
||||
script: schema.maybe(
|
||||
schema.oneOf([
|
||||
schema.string(),
|
||||
schema.object({
|
||||
source: schema.string(),
|
||||
}),
|
||||
])
|
||||
),
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -40,7 +40,7 @@ type RuntimeType = typeof RUNTIME_FIELD_TYPES[number];
|
|||
|
||||
export interface RuntimeField {
|
||||
type: RuntimeType;
|
||||
script:
|
||||
script?:
|
||||
| string
|
||||
| {
|
||||
source: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue