Skip to content

Commit

Permalink
Fix errors around arrays in ML requests (#2623)
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin authored Jun 19, 2024
1 parent cdbf6b9 commit 3812974
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 31 deletions.
46 changes: 29 additions & 17 deletions output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions specification/ml/_types/Datafeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import { Dictionary } from '@spec_utils/Dictionary'
import { AggregationContainer } from '@_types/aggregations/AggregationContainer'
import { Id, IndicesOptions } from '@_types/common'
import { Id, Indices, IndicesOptions } from '@_types/common'
import { RuntimeFields } from '@_types/mapping/RuntimeFields'
import { integer, long } from '@_types/Numeric'
import { QueryContainer } from '@_types/query_dsl/abstractions'
Expand Down Expand Up @@ -82,7 +82,7 @@ export class DatafeedConfig {
* 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.
* @aliases indexes
*/
indices?: string[]
indices?: Indices
/**
* Specifies index expansion options that are used during search.
*/
Expand Down
12 changes: 8 additions & 4 deletions specification/ml/get_trained_models/MlGetTrainedModelRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { RequestBase } from '@_types/Base'
import { Id } from '@_types/common'
import { Ids } from '@_types/common'
import { integer } from '@_types/Numeric'
import { Include } from '@ml/_types/Include'

Expand All @@ -32,9 +32,13 @@ import { Include } from '@ml/_types/Include'
export interface Request extends RequestBase {
path_parts: {
/**
* The unique identifier of the trained model.
* The unique identifier of the trained model or a model alias.
*
* You can get information for multiple trained models in a single API
* request by using a comma-separated list of model IDs or a wildcard
* expression.
*/
model_id?: Id
model_id?: Ids
}
query_parameters: {
/**
Expand Down Expand Up @@ -82,6 +86,6 @@ export interface Request extends RequestBase {
* none. When supplied, only trained models that contain all the supplied
* tags are returned.
*/
tags?: string
tags?: string | string[]
}
}
4 changes: 2 additions & 2 deletions specification/ml/put_calendar_job/MlPutCalendarJobRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { RequestBase } from '@_types/Base'
import { Id } from '@_types/common'
import { Id, Ids } from '@_types/common'

/**
* Adds an anomaly detection job to a calendar.
Expand All @@ -32,6 +32,6 @@ export interface Request extends RequestBase {
/** A string that uniquely identifies a calendar. */
calendar_id: Id
/** 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. */
job_id: Id
job_id: Ids
}
}

0 comments on commit 3812974

Please sign in to comment.