Skip to content

Commit ffe95c6

Browse files
Fix misc issues found with java-client+recordings (#1945) (#1949)
Co-authored-by: Sylvain Wallez <[email protected]>
1 parent d4c5cca commit ffe95c6

File tree

8 files changed

+376
-327
lines changed

8 files changed

+376
-327
lines changed

output/schema/schema.json

Lines changed: 312 additions & 279 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: 25 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/enrich/_types/Policy.ts

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

2020
import { Field, Fields, Indices, Name } from '@_types/common'
21+
import { SingleKeyDictionary } from '@spec_utils/Dictionary'
2122

2223
export class Summary {
23-
config: Configuration
24+
config: SingleKeyDictionary<PolicyType, Policy>
2425
}
2526

26-
export class Configuration {
27-
geo_match?: Policy
28-
match: Policy
29-
range: Policy
27+
export enum PolicyType {
28+
geo_match,
29+
match,
30+
range
3031
}
3132

3233
export class Policy {
@@ -35,4 +36,5 @@ export class Policy {
3536
match_field: Field
3637
query?: string
3738
name?: Name
39+
elasticsearch_version?: string
3840
}

specification/ingest/simulate/types.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
import { Dictionary } from '@spec_utils/Dictionary'
2121
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
2222
import { ActionStatusOptions } from '@watcher/_types/Action'
23-
import { Id, IndexName, Name } from '@_types/common'
23+
import { Id, IndexName, Name, VersionNumber, VersionType } from '@_types/common'
2424
import { DateTime } from '@_types/Time'
25+
import { AdditionalProperties } from '@spec_utils/behaviors'
26+
import { Stringified } from '@spec_utils/Stringified'
2527

2628
export class Ingest {
2729
timestamp: DateTime
@@ -42,11 +44,17 @@ export class Document {
4244
_source: UserDefinedValue
4345
}
4446

45-
export class DocumentSimulation {
47+
/**
48+
* The simulated document, with optional metadata.
49+
*/
50+
export class DocumentSimulation
51+
implements AdditionalProperties<string, string>
52+
{
4653
_id: Id
4754
_index: IndexName
4855
_ingest: Ingest
49-
_parent?: string
5056
_routing?: string
5157
_source: Dictionary<string, UserDefinedValue>
58+
_version?: Stringified<VersionNumber>
59+
_version_type?: VersionType
5260
}

specification/license/post/PostLicenseRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ export interface Request extends RequestBase {
3939
/**
4040
* A sequence of one or more JSON documents containing the license information.
4141
*/
42-
licenses: Array<License>
42+
licenses?: Array<License>
4343
}
4444
}

specification/ssl/certificates/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export class CertificateInformation {
2424
expiry: DateTime
2525
format: string
2626
has_private_key: boolean
27+
issuer?: string
2728
path: string
2829
serial_number: string
2930
subject_dn: string

specification/transform/_types/Transform.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,16 @@ export class Settings {
130130
* @server_default 500
131131
*/
132132
max_page_search_size?: integer
133+
134+
/**
135+
* If `true`, the transform runs in unattended mode. In unattended mode, the transform retries indefinitely in case
136+
* of an error which means the transform never fails. Setting the number of retries other than infinite fails in
137+
* validation.
138+
*
139+
* @since 8.5.0
140+
* @server_default false
141+
*/
142+
unattended?: boolean
133143
}
134144

135145
export class Source {

specification/xpack/usage/types.ts

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { Job, JobStatistics } from '@ml/_types/Job'
2525
import { double, integer, long, uint, ulong } from '@_types/Numeric'
2626
import { AdditionalProperties } from '@spec_utils/behaviors'
2727
import { Duration, DurationValue, UnitMillis } from '@_types/Time'
28+
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
2829

2930
export class Base {
3031
available: boolean
@@ -230,6 +231,7 @@ export class MlInferenceTrainedModelsCount {
230231
total: long
231232
prepackaged: long
232233
other: long
234+
pass_through?: long
233235
regression?: long
234236
classification?: long
235237
ner?: long
@@ -341,27 +343,18 @@ export class FrozenIndices extends Base {
341343
indices_count: long
342344
}
343345

344-
export class AllJobs {
346+
export class JobUsage {
345347
count: integer
346-
detectors: Dictionary<string, integer>
347-
created_by: Dictionary<string, string | integer>
348-
model_size: Dictionary<string, integer>
349-
forecasts: Dictionary<string, integer>
350-
}
351-
352-
// The 'jobs' entry in MachineLearning can either contain a dictionary of
353-
// individual jobs or a single summary entry under the key '_all'.
354-
// The layout of the summary varies from that of the individual job,
355-
// and is specified in the 'AllJobs' class (defined above).
356-
export class Jobs implements AdditionalProperties<string, Job> {
357-
_all?: AllJobs
348+
created_by: Dictionary<string, long>
349+
detectors: JobStatistics
350+
forecasts: MlJobForecasts
351+
model_size: JobStatistics
358352
}
359353

360354
export class MachineLearning extends Base {
361355
datafeeds: Dictionary<string, Datafeed>
362-
// TODO: xPack marks the entire Job definition as optional
363-
// while the MlJob has many required properties.
364-
jobs: Jobs
356+
/** Job usage statistics. The `_all` entry is always present and gathers statistics for all jobs. */
357+
jobs: Dictionary<string, JobUsage>
365358
node_count: integer
366359
data_frame_analytics_jobs: MlDataFrameAnalyticsJobs
367360
inference: MlInference

0 commit comments

Comments
 (0)