From ef1f685088ab190737c9dced46b54c1ebaf72609 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Thu, 12 Sep 2024 16:57:14 +0200 Subject: [PATCH 1/5] [877] ngram and edge tokenizer optional values --- output/openapi/elasticsearch-openapi.json | 8 ++------ output/openapi/elasticsearch-serverless-openapi.json | 8 ++------ output/schema/schema-serverless.json | 8 ++++---- output/schema/schema.json | 8 ++++---- output/typescript/types.ts | 8 ++++---- specification/_types/analysis/tokenizers.ts | 8 ++++---- 6 files changed, 20 insertions(+), 28 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 3f8184d024..27ee9cf9f5 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -57499,9 +57499,7 @@ } }, "required": [ - "type", - "max_gram", - "min_gram" + "type" ] } ] @@ -57614,9 +57612,7 @@ } }, "required": [ - "type", - "max_gram", - "min_gram" + "type" ] } ] diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 89b49e7af8..26d5eda755 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -39244,9 +39244,7 @@ } }, "required": [ - "type", - "max_gram", - "min_gram" + "type" ] } ] @@ -39359,9 +39357,7 @@ } }, "required": [ - "type", - "max_gram", - "min_gram" + "type" ] } ] diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 61b940d60f..00ed69e3fa 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -84773,7 +84773,7 @@ }, { "name": "max_gram", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -84784,7 +84784,7 @@ }, { "name": "min_gram", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -84929,7 +84929,7 @@ }, { "name": "max_gram", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -84940,7 +84940,7 @@ }, { "name": "min_gram", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 47fc6f06c5..df77d90890 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -65408,7 +65408,7 @@ }, { "name": "max_gram", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -65419,7 +65419,7 @@ }, { "name": "min_gram", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -68231,7 +68231,7 @@ }, { "name": "max_gram", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -68242,7 +68242,7 @@ }, { "name": "min_gram", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index e9e3ef2ad2..dee9695914 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -4590,8 +4590,8 @@ export interface AnalysisEdgeNGramTokenFilter extends AnalysisTokenFilterBase { export interface AnalysisEdgeNGramTokenizer extends AnalysisTokenizerBase { type: 'edge_ngram' custom_token_chars?: string - max_gram: integer - min_gram: integer + max_gram?: integer + min_gram?: integer token_chars?: AnalysisTokenChar[] } @@ -4933,8 +4933,8 @@ export interface AnalysisNGramTokenFilter extends AnalysisTokenFilterBase { export interface AnalysisNGramTokenizer extends AnalysisTokenizerBase { type: 'ngram' custom_token_chars?: string - max_gram: integer - min_gram: integer + max_gram?: integer + min_gram?: integer token_chars?: AnalysisTokenChar[] } diff --git a/specification/_types/analysis/tokenizers.ts b/specification/_types/analysis/tokenizers.ts index 948149aaeb..31086cbda2 100644 --- a/specification/_types/analysis/tokenizers.ts +++ b/specification/_types/analysis/tokenizers.ts @@ -48,8 +48,8 @@ export class ClassicTokenizer extends TokenizerBase { export class EdgeNGramTokenizer extends TokenizerBase { type: 'edge_ngram' custom_token_chars?: string - max_gram: integer - min_gram: integer + max_gram?: integer + min_gram?: integer /** * @server_default [] */ @@ -84,8 +84,8 @@ export class LowercaseTokenizer extends TokenizerBase { export class NGramTokenizer extends TokenizerBase { type: 'ngram' custom_token_chars?: string - max_gram: integer - min_gram: integer + max_gram?: integer + min_gram?: integer /** * @server_default [] */ From b9710119b1bce65d8ec325aadda4f73a097d5223 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Fri, 27 Sep 2024 12:50:45 +0200 Subject: [PATCH 2/5] [880] _shards optional because of wait_for_completion --- output/openapi/elasticsearch-openapi.json | 5 +---- output/openapi/elasticsearch-serverless-openapi.json | 5 +---- output/schema/schema-serverless.json | 4 ++-- output/schema/schema.json | 4 ++-- output/typescript/types.ts | 2 +- specification/_types/Base.ts | 3 ++- 6 files changed, 9 insertions(+), 14 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 27ee9cf9f5..c2fa540081 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -66738,10 +66738,7 @@ "_shards": { "$ref": "#/components/schemas/_types:ShardStatistics" } - }, - "required": [ - "_shards" - ] + } }, "indices.close:CloseIndexResult": { "type": "object", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 26d5eda755..4b788265c1 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -45340,10 +45340,7 @@ "_shards": { "$ref": "#/components/schemas/_types:ShardStatistics" } - }, - "required": [ - "_shards" - ] + } }, "indices.resolve_index:ResolveIndexItem": { "type": "object", diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 00ed69e3fa..0629fe4f49 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -119116,7 +119116,7 @@ "properties": [ { "name": "_shards", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -119126,7 +119126,7 @@ } } ], - "specLocation": "_types/Base.ts#L91-L93" + "specLocation": "_types/Base.ts#L91-L94" }, { "kind": "interface", diff --git a/output/schema/schema.json b/output/schema/schema.json index df77d90890..844e8996d6 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -48904,7 +48904,7 @@ "properties": [ { "name": "_shards", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -48914,7 +48914,7 @@ } } ], - "specLocation": "_types/Base.ts#L91-L93" + "specLocation": "_types/Base.ts#L91-L94" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index dee9695914..8d203148b0 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2830,7 +2830,7 @@ export interface ShardStatistics { } export interface ShardsOperationResponseBase { - _shards: ShardStatistics + _shards?: ShardStatistics } export interface SlicedScroll { diff --git a/specification/_types/Base.ts b/specification/_types/Base.ts index 2ac27fe0c5..383dab96b3 100644 --- a/specification/_types/Base.ts +++ b/specification/_types/Base.ts @@ -89,7 +89,8 @@ export class IndicesResponseBase extends AcknowledgedResponseBase { } export class ShardsOperationResponseBase { - _shards: ShardStatistics + // _shards is always returned, but not when wait_for_completion is false in the request + _shards?: ShardStatistics } export class CustomResponseBuilderBase {} From 816a2b31ec2e34681e2b3ae5387e90e94dbc2d1d Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Fri, 27 Sep 2024 14:40:44 +0200 Subject: [PATCH 3/5] [881] added missing allow_custom_routing --- output/openapi/elasticsearch-openapi.json | 3 +++ .../openapi/elasticsearch-serverless-openapi.json | 3 +++ output/schema/schema-serverless.json | 13 ++++++++++++- output/schema/schema.json | 13 ++++++++++++- output/typescript/types.ts | 1 + specification/indices/_types/DataStream.ts | 1 + 6 files changed, 32 insertions(+), 2 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index c2fa540081..740697e52f 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -67313,6 +67313,9 @@ "properties": { "hidden": { "type": "boolean" + }, + "allow_custom_routing": { + "type": "boolean" } } }, diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 4b788265c1..da83d801e2 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -45331,6 +45331,9 @@ "properties": { "hidden": { "type": "boolean" + }, + "allow_custom_routing": { + "type": "boolean" } } }, diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 0629fe4f49..2aa3af948f 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -119103,9 +119103,20 @@ "namespace": "_builtins" } } + }, + { + "name": "allow_custom_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "indices/_types/DataStream.ts#L159-L161" + "specLocation": "indices/_types/DataStream.ts#L159-L162" }, { "kind": "interface", diff --git a/output/schema/schema.json b/output/schema/schema.json index 844e8996d6..a2dc95aab9 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -122667,9 +122667,20 @@ "namespace": "_builtins" } } + }, + { + "name": "allow_custom_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "indices/_types/DataStream.ts#L159-L161" + "specLocation": "indices/_types/DataStream.ts#L159-L162" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 8d203148b0..49c1ae54b9 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10912,6 +10912,7 @@ export interface IndicesDataStreamTimestampField { export interface IndicesDataStreamVisibility { hidden?: boolean + allow_custom_routing?: boolean } export interface IndicesDownsampleConfig { diff --git a/specification/indices/_types/DataStream.ts b/specification/indices/_types/DataStream.ts index 73c47d95c6..b416ef5383 100644 --- a/specification/indices/_types/DataStream.ts +++ b/specification/indices/_types/DataStream.ts @@ -158,4 +158,5 @@ export class DataStreamIndex { export class DataStreamVisibility { hidden?: boolean + allow_custom_routing?: boolean } From 4612859c10ca9d12f76b389ee06e6b2143ffd95a Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Fri, 27 Sep 2024 15:09:27 +0200 Subject: [PATCH 4/5] [883] action and name optional next_step --- output/openapi/elasticsearch-openapi.json | 2 -- output/schema/schema.json | 6 +++--- output/typescript/types.ts | 4 ++-- specification/ilm/move_to_step/types.ts | 5 +++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 740697e52f..883fcf6d47 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -66528,8 +66528,6 @@ } }, "required": [ - "action", - "name", "phase" ] }, diff --git a/output/schema/schema.json b/output/schema/schema.json index a2dc95aab9..847b75f7f8 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -121519,7 +121519,7 @@ "properties": [ { "name": "action", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -121530,7 +121530,7 @@ }, { "name": "name", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -121551,7 +121551,7 @@ } } ], - "specLocation": "ilm/move_to_step/types.ts#L20-L24" + "specLocation": "ilm/move_to_step/types.ts#L20-L25" }, { "kind": "request", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 49c1ae54b9..f69ac903d1 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10783,8 +10783,8 @@ export interface IlmMoveToStepRequest extends RequestBase { export type IlmMoveToStepResponse = AcknowledgedResponseBase export interface IlmMoveToStepStepKey { - action: string - name: string + action?: string + name?: string phase: string } diff --git a/specification/ilm/move_to_step/types.ts b/specification/ilm/move_to_step/types.ts index 01d8fca691..f15c0df8fd 100644 --- a/specification/ilm/move_to_step/types.ts +++ b/specification/ilm/move_to_step/types.ts @@ -18,7 +18,8 @@ */ export class StepKey { - action: string - name: string + // action and name are optional in case they are used in next_step + action?: string + name?: string phase: string } From 984b25d2eef6f8b0ea6dca4fd6c1a30cf451943e Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Tue, 1 Oct 2024 17:56:01 +0200 Subject: [PATCH 5/5] both steps mandatory in move to step request --- output/openapi/elasticsearch-openapi.json | 6 +++++- output/schema/schema.json | 4 ++-- output/typescript/types.ts | 4 ++-- specification/ilm/move_to_step/MoveToStepRequest.ts | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 883fcf6d47..b9886b52fd 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -9643,7 +9643,11 @@ "next_step": { "$ref": "#/components/schemas/ilm.move_to_step:StepKey" } - } + }, + "required": [ + "current_step", + "next_step" + ] } } } diff --git a/output/schema/schema.json b/output/schema/schema.json index 847b75f7f8..181491e655 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -121442,7 +121442,7 @@ "properties": [ { "name": "current_step", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { @@ -121453,7 +121453,7 @@ }, { "name": "next_step", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index f69ac903d1..b86ebfdf5f 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10775,8 +10775,8 @@ export interface IlmMigrateToDataTiersResponse { export interface IlmMoveToStepRequest extends RequestBase { index: IndexName body?: { - current_step?: IlmMoveToStepStepKey - next_step?: IlmMoveToStepStepKey + current_step: IlmMoveToStepStepKey + next_step: IlmMoveToStepStepKey } } diff --git a/specification/ilm/move_to_step/MoveToStepRequest.ts b/specification/ilm/move_to_step/MoveToStepRequest.ts index 3005e5f99b..d2d5f305ea 100644 --- a/specification/ilm/move_to_step/MoveToStepRequest.ts +++ b/specification/ilm/move_to_step/MoveToStepRequest.ts @@ -30,7 +30,7 @@ export interface Request extends RequestBase { index: IndexName } body: { - current_step?: StepKey - next_step?: StepKey + current_step: StepKey + next_step: StepKey } }