Skip to content

Commit 3812974

Browse files
authored
Fix errors around arrays in ML requests (#2623)
1 parent cdbf6b9 commit 3812974

File tree

5 files changed

+47
-31
lines changed

5 files changed

+47
-31
lines changed

output/schema/schema.json

Lines changed: 29 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/ml/_types/Datafeed.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import { Dictionary } from '@spec_utils/Dictionary'
2121
import { AggregationContainer } from '@_types/aggregations/AggregationContainer'
22-
import { Id, IndicesOptions } from '@_types/common'
22+
import { Id, Indices, IndicesOptions } from '@_types/common'
2323
import { RuntimeFields } from '@_types/mapping/RuntimeFields'
2424
import { integer, long } from '@_types/Numeric'
2525
import { QueryContainer } from '@_types/query_dsl/abstractions'
@@ -82,7 +82,7 @@ export class DatafeedConfig {
8282
* An array of index names. Wildcards are supported. If any indices are in remote clusters, the machine learning nodes must have the `remote_cluster_client` role.
8383
* @aliases indexes
8484
*/
85-
indices?: string[]
85+
indices?: Indices
8686
/**
8787
* Specifies index expansion options that are used during search.
8888
*/

specification/ml/get_trained_models/MlGetTrainedModelRequest.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { RequestBase } from '@_types/Base'
21-
import { Id } from '@_types/common'
21+
import { Ids } from '@_types/common'
2222
import { integer } from '@_types/Numeric'
2323
import { Include } from '@ml/_types/Include'
2424

@@ -32,9 +32,13 @@ import { Include } from '@ml/_types/Include'
3232
export interface Request extends RequestBase {
3333
path_parts: {
3434
/**
35-
* The unique identifier of the trained model.
35+
* The unique identifier of the trained model or a model alias.
36+
*
37+
* You can get information for multiple trained models in a single API
38+
* request by using a comma-separated list of model IDs or a wildcard
39+
* expression.
3640
*/
37-
model_id?: Id
41+
model_id?: Ids
3842
}
3943
query_parameters: {
4044
/**
@@ -82,6 +86,6 @@ export interface Request extends RequestBase {
8286
* none. When supplied, only trained models that contain all the supplied
8387
* tags are returned.
8488
*/
85-
tags?: string
89+
tags?: string | string[]
8690
}
8791
}

specification/ml/put_calendar_job/MlPutCalendarJobRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { RequestBase } from '@_types/Base'
21-
import { Id } from '@_types/common'
21+
import { Id, Ids } from '@_types/common'
2222

2323
/**
2424
* Adds an anomaly detection job to a calendar.
@@ -32,6 +32,6 @@ export interface Request extends RequestBase {
3232
/** A string that uniquely identifies a calendar. */
3333
calendar_id: Id
3434
/** An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a comma-separated list of jobs or groups. */
35-
job_id: Id
35+
job_id: Ids
3636
}
3737
}

0 commit comments

Comments
 (0)