diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 9ad1a2443d..09cbbaa6cc 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -72371,17 +72371,11 @@ "type": "number" }, "token_chars": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.analysis.TokenChar" - } - } - ] + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.analysis.TokenChar" + } } }, "required": [ diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 92e8b38705..86ee8c7b50 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -46824,17 +46824,11 @@ "type": "number" }, "token_chars": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.analysis.TokenChar" - } - } - ] + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.analysis.TokenChar" + } } }, "required": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index 7d40572e7d..1f235a82b8 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -73981,33 +73981,23 @@ } }, { + "esQuirk": "A comma-separated string is also accepted but the enum array is enough", "name": "token_chars", "required": false, + "serverDefault": [], "type": { - "kind": "union_of", - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "TokenChar", - "namespace": "_types.analysis" - } - } + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "TokenChar", + "namespace": "_types.analysis" } - ] + } } } ], - "specLocation": "_types/analysis/tokenizers.ts#L48-L54" + "specLocation": "_types/analysis/tokenizers.ts#L48-L58" }, { "kind": "interface", @@ -76042,7 +76032,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L65-L71" + "specLocation": "_types/analysis/tokenizers.ts#L69-L75" }, { "kind": "interface", @@ -76485,7 +76475,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L73-L75" + "specLocation": "_types/analysis/tokenizers.ts#L77-L79" }, { "kind": "interface", @@ -76693,7 +76683,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L77-L79" + "specLocation": "_types/analysis/tokenizers.ts#L81-L83" }, { "kind": "interface", @@ -77000,6 +76990,7 @@ } }, { + "esQuirk": "A comma-separated string is also accepted but the enum array is enough", "name": "token_chars", "required": false, "serverDefault": [], @@ -77015,7 +77006,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L81-L90" + "specLocation": "_types/analysis/tokenizers.ts#L85-L95" }, { "kind": "interface", @@ -77403,7 +77394,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L92-L99" + "specLocation": "_types/analysis/tokenizers.ts#L97-L104" }, { "kind": "interface", @@ -77721,7 +77712,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L101-L106" + "specLocation": "_types/analysis/tokenizers.ts#L106-L111" }, { "kind": "interface", @@ -78639,7 +78630,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L113-L116" + "specLocation": "_types/analysis/tokenizers.ts#L118-L121" }, { "kind": "interface", @@ -78674,7 +78665,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L108-L111" + "specLocation": "_types/analysis/tokenizers.ts#L113-L116" }, { "kind": "interface", @@ -79059,7 +79050,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L118-L121" + "specLocation": "_types/analysis/tokenizers.ts#L123-L126" }, { "kind": "interface", @@ -79724,7 +79715,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L123-L125" + "specLocation": "_types/analysis/tokenizers.ts#L128-L130" }, { "kind": "enum", @@ -79752,7 +79743,7 @@ "name": "TokenChar", "namespace": "_types.analysis" }, - "specLocation": "_types/analysis/tokenizers.ts#L56-L63" + "specLocation": "_types/analysis/tokenizers.ts#L60-L67" }, { "kind": "type_alias", @@ -80356,7 +80347,7 @@ "name": "Tokenizer", "namespace": "_types.analysis" }, - "specLocation": "_types/analysis/tokenizers.ts#L137-L142", + "specLocation": "_types/analysis/tokenizers.ts#L142-L147", "type": { "kind": "union_of", "items": [ @@ -80404,7 +80395,7 @@ "name": "TokenizerDefinition", "namespace": "_types.analysis" }, - "specLocation": "_types/analysis/tokenizers.ts#L144-L167", + "specLocation": "_types/analysis/tokenizers.ts#L149-L172", "type": { "kind": "union_of", "items": [ @@ -80689,7 +80680,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L127-L130" + "specLocation": "_types/analysis/tokenizers.ts#L132-L135" }, { "kind": "interface", @@ -80813,7 +80804,7 @@ } } ], - "specLocation": "_types/analysis/tokenizers.ts#L132-L135" + "specLocation": "_types/analysis/tokenizers.ts#L137-L140" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index b4751de920..9d8a55192d 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -4756,7 +4756,7 @@ export interface AnalysisEdgeNGramTokenizer extends AnalysisTokenizerBase { custom_token_chars?: string max_gram?: integer min_gram?: integer - token_chars?: string | AnalysisTokenChar[] + token_chars?: AnalysisTokenChar[] } export interface AnalysisElisionTokenFilter extends AnalysisTokenFilterBase { diff --git a/specification/_types/analysis/tokenizers.ts b/specification/_types/analysis/tokenizers.ts index 649b555eea..591e5c357f 100644 --- a/specification/_types/analysis/tokenizers.ts +++ b/specification/_types/analysis/tokenizers.ts @@ -50,7 +50,11 @@ export class EdgeNGramTokenizer extends TokenizerBase { custom_token_chars?: string max_gram?: integer min_gram?: integer - token_chars?: string | TokenChar[] + /** + * @es_quirk A comma-separated string is also accepted but the enum array is enough + * @server_default [] + */ + token_chars?: TokenChar[] } export enum TokenChar { @@ -84,6 +88,7 @@ export class NGramTokenizer extends TokenizerBase { max_gram?: integer min_gram?: integer /** + * @es_quirk A comma-separated string is also accepted but the enum array is enough * @server_default [] */ token_chars?: TokenChar[]