From 0addeeb83c3fa104a8942d03f881f52a1092a2e7 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Wed, 30 Apr 2025 07:47:02 -0700 Subject: [PATCH 1/2] Augment description for index name in create index API (#4333) (cherry picked from commit 872c513ce433df8fabcf5ffd8e98da0e85ab9921) --- output/openapi/elasticsearch-openapi.json | 2 +- output/openapi/elasticsearch-serverless-openapi.json | 2 +- output/schema/schema.json | 4 ++-- specification/indices/create/IndicesCreateRequest.ts | 11 +++++++++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 91f7cc9e84..691083bd08 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -12826,7 +12826,7 @@ { "in": "path", "name": "index", - "description": "Name of the index you wish to create.", + "description": "Name of the index you wish to create.\nIndex names must meet the following criteria:\n\n* Lowercase only\n* Cannot include `\\`, `/`, `*`, `?`, `\"`, `<`, `>`, `|`, ` ` (space character), `,`, or `#`\n* Indices prior to 7.0 could contain a colon (`:`), but that has been deprecated and will not be supported in later versions\n* Cannot start with `-`, `_`, or `+`\n* Cannot be `.` or `..`\n* Cannot be longer than 255 bytes (note thtat it is bytes, so multi-byte characters will reach the limit faster)\n* Names starting with `.` are deprecated, except for hidden indices and internal indices managed by plugins", "required": true, "deprecated": false, "schema": { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 8659ff3428..534f210114 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -6657,7 +6657,7 @@ { "in": "path", "name": "index", - "description": "Name of the index you wish to create.", + "description": "Name of the index you wish to create.\nIndex names must meet the following criteria:\n\n* Lowercase only\n* Cannot include `\\`, `/`, `*`, `?`, `\"`, `<`, `>`, `|`, ` ` (space character), `,`, or `#`\n* Indices prior to 7.0 could contain a colon (`:`), but that has been deprecated and will not be supported in later versions\n* Cannot start with `-`, `_`, or `+`\n* Cannot be `.` or `..`\n* Cannot be longer than 255 bytes (note thtat it is bytes, so multi-byte characters will reach the limit faster)\n* Names starting with `.` are deprecated, except for hidden indices and internal indices managed by plugins", "required": true, "deprecated": false, "schema": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 881bbcf4b9..6b77092b16 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -137621,7 +137621,7 @@ }, "path": [ { - "description": "Name of the index you wish to create.", + "description": "Name of the index you wish to create.\nIndex names must meet the following criteria:\n\n* Lowercase only\n* Cannot include `\\`, `/`, `*`, `?`, `\"`, `<`, `>`, `|`, ` ` (space character), `,`, or `#`\n* Indices prior to 7.0 could contain a colon (`:`), but that has been deprecated and will not be supported in later versions\n* Cannot start with `-`, `_`, or `+`\n* Cannot be `.` or `..`\n* Cannot be longer than 255 bytes (note thtat it is bytes, so multi-byte characters will reach the limit faster)\n* Names starting with `.` are deprecated, except for hidden indices and internal indices managed by plugins", "name": "index", "required": true, "type": { @@ -137674,7 +137674,7 @@ } } ], - "specLocation": "indices/create/IndicesCreateRequest.ts#L28-L108" + "specLocation": "indices/create/IndicesCreateRequest.ts#L28-L115" }, { "kind": "response", diff --git a/specification/indices/create/IndicesCreateRequest.ts b/specification/indices/create/IndicesCreateRequest.ts index c3b59941a6..6995ecdb0e 100644 --- a/specification/indices/create/IndicesCreateRequest.ts +++ b/specification/indices/create/IndicesCreateRequest.ts @@ -46,8 +46,6 @@ import { Duration } from '@_types/Time' * * You can change the default of only waiting for the primary shards to start through the index setting `index.write.wait_for_active_shards`. * Note that changing this setting will also affect the `wait_for_active_shards` value on all subsequent write operations. - - * @doc_id indices-create-index * @rest_spec_name indices.create * @availability stack stability=stable @@ -64,6 +62,15 @@ export interface Request extends RequestBase { path_parts: { /** * Name of the index you wish to create. + * Index names must meet the following criteria: + * + * * Lowercase only + * * Cannot include `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, ` ` (space character), `,`, or `#` + * * Indices prior to 7.0 could contain a colon (`:`), but that has been deprecated and will not be supported in later versions + * * Cannot start with `-`, `_`, or `+` + * * Cannot be `.` or `..` + * * Cannot be longer than 255 bytes (note thtat it is bytes, so multi-byte characters will reach the limit faster) + * * Names starting with `.` are deprecated, except for hidden indices and internal indices managed by plugins */ index: IndexName } From 8030e98d7beca78b800e756c28cb1bf082ff3496 Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 30 Apr 2025 07:50:28 -0700 Subject: [PATCH 2/2] Regenerate output --- output/openapi/elasticsearch-openapi.json | 32 ++++++---- .../elasticsearch-serverless-openapi.json | 20 ++++--- output/schema/schema.json | 58 ++++++++++++++----- output/typescript/types.ts | 12 ++-- 4 files changed, 84 insertions(+), 38 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 691083bd08..112e59e9de 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -50457,7 +50457,10 @@ "type": "boolean" }, "fields": { - "$ref": "#/components/schemas/_types.Fields" + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } }, "sort": { "$ref": "#/components/schemas/_types.Sort" @@ -75170,8 +75173,7 @@ }, "required": [ "index", - "managed", - "phase" + "managed" ] }, "ilm.explain_lifecycle.LifecycleExplainPhaseExecution": { @@ -81737,7 +81739,7 @@ "processor_results": { "type": "array", "items": { - "$ref": "#/components/schemas/ingest._types.PipelineSimulation" + "$ref": "#/components/schemas/ingest._types.PipelineProcessorResult" } } } @@ -81819,7 +81821,7 @@ } ] }, - "ingest._types.PipelineSimulation": { + "ingest._types.PipelineProcessorResult": { "type": "object", "properties": { "doc": { @@ -81832,7 +81834,7 @@ "type": "string" }, "status": { - "$ref": "#/components/schemas/watcher._types.ActionStatusOptions" + "$ref": "#/components/schemas/ingest._types.PipelineSimulationStatusOptions" }, "description": { "type": "string" @@ -81845,13 +81847,14 @@ } } }, - "watcher._types.ActionStatusOptions": { + "ingest._types.PipelineSimulationStatusOptions": { "type": "string", "enum": [ "success", - "failure", - "simulated", - "throttled" + "error", + "error_ignored", + "skipped", + "dropped" ] }, "license.get.LicenseInformation": { @@ -97905,6 +97908,15 @@ "message" ] }, + "watcher._types.ActionStatusOptions": { + "type": "string", + "enum": [ + "success", + "failure", + "simulated", + "throttled" + ] + }, "watcher._types.WebhookResult": { "type": "object", "properties": { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 534f210114..47739a8833 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -30123,7 +30123,10 @@ "type": "boolean" }, "fields": { - "$ref": "#/components/schemas/_types.Fields" + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } }, "sort": { "$ref": "#/components/schemas/_types.Sort" @@ -53120,7 +53123,7 @@ "processor_results": { "type": "array", "items": { - "$ref": "#/components/schemas/ingest._types.PipelineSimulation" + "$ref": "#/components/schemas/ingest._types.PipelineProcessorResult" } } } @@ -53202,7 +53205,7 @@ } ] }, - "ingest._types.PipelineSimulation": { + "ingest._types.PipelineProcessorResult": { "type": "object", "properties": { "doc": { @@ -53215,7 +53218,7 @@ "type": "string" }, "status": { - "$ref": "#/components/schemas/watcher._types.ActionStatusOptions" + "$ref": "#/components/schemas/ingest._types.PipelineSimulationStatusOptions" }, "description": { "type": "string" @@ -53228,13 +53231,14 @@ } } }, - "watcher._types.ActionStatusOptions": { + "ingest._types.PipelineSimulationStatusOptions": { "type": "string", "enum": [ "success", - "failure", - "simulated", - "throttled" + "error", + "error_ignored", + "skipped", + "dropped" ] }, "license.get.LicenseInformation": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 6b77092b16..414a3ee320 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -39417,10 +39417,13 @@ "name": "fields", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "Fields", - "namespace": "_types" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } } } }, @@ -130117,7 +130120,7 @@ }, { "name": "phase", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -158062,7 +158065,7 @@ } } ], - "specLocation": "ingest/_types/Simulation.ts#L62-L76" + "specLocation": "ingest/_types/Simulation.ts#L69-L83" }, { "kind": "interface", @@ -158202,7 +158205,7 @@ } } ], - "specLocation": "ingest/_types/Simulation.ts#L78-L108" + "specLocation": "ingest/_types/Simulation.ts#L85-L115" }, { "kind": "interface", @@ -159377,7 +159380,7 @@ } } ], - "specLocation": "ingest/_types/Simulation.ts#L29-L37" + "specLocation": "ingest/_types/Simulation.ts#L28-L36" }, { "kind": "interface", @@ -160207,7 +160210,7 @@ { "kind": "interface", "name": { - "name": "PipelineSimulation", + "name": "PipelineProcessorResult", "namespace": "ingest._types" }, "properties": [ @@ -160250,8 +160253,8 @@ "type": { "kind": "instance_of", "type": { - "name": "ActionStatusOptions", - "namespace": "watcher._types" + "name": "PipelineSimulationStatusOptions", + "namespace": "ingest._types" } } }, @@ -160289,7 +160292,32 @@ } } ], - "specLocation": "ingest/_types/Simulation.ts#L52-L60" + "specLocation": "ingest/_types/Simulation.ts#L59-L67" + }, + { + "kind": "enum", + "members": [ + { + "name": "success" + }, + { + "name": "error" + }, + { + "name": "error_ignored" + }, + { + "name": "skipped" + }, + { + "name": "dropped" + } + ], + "name": { + "name": "PipelineSimulationStatusOptions", + "namespace": "ingest._types" + }, + "specLocation": "ingest/_types/Simulation.ts#L51-L57" }, { "kind": "interface", @@ -161024,7 +161052,7 @@ } } ], - "specLocation": "ingest/_types/Simulation.ts#L39-L44" + "specLocation": "ingest/_types/Simulation.ts#L38-L43" }, { "kind": "interface", @@ -161657,14 +161685,14 @@ "value": { "kind": "instance_of", "type": { - "name": "PipelineSimulation", + "name": "PipelineProcessorResult", "namespace": "ingest._types" } } } } ], - "specLocation": "ingest/_types/Simulation.ts#L46-L50" + "specLocation": "ingest/_types/Simulation.ts#L45-L49" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index d9e23efcb1..6aa9b43e2a 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -1516,7 +1516,7 @@ export interface SearchInnerHits { ignore_unmapped?: boolean script_fields?: Record seq_no_primary_term?: boolean - fields?: Fields + fields?: Field[] sort?: Sort _source?: SearchSourceConfig stored_fields?: Fields @@ -11088,7 +11088,7 @@ export interface IlmExplainLifecycleLifecycleExplainManaged { lifecycle_date?: DateTime lifecycle_date_millis?: EpochTime managed: true - phase: Name + phase?: Name phase_time?: DateTime phase_time_millis?: EpochTime policy?: Name @@ -14209,16 +14209,18 @@ export interface IngestPipelineProcessor extends IngestProcessorBase { ignore_missing_pipeline?: boolean } -export interface IngestPipelineSimulation { +export interface IngestPipelineProcessorResult { doc?: IngestDocumentSimulation tag?: string processor_type?: string - status?: WatcherActionStatusOptions + status?: IngestPipelineSimulationStatusOptions description?: string ignored_error?: ErrorCause error?: ErrorCause } +export type IngestPipelineSimulationStatusOptions = 'success' | 'error' | 'error_ignored' | 'skipped' | 'dropped' + export interface IngestProcessorBase { description?: string if?: Script | ScriptSource @@ -14340,7 +14342,7 @@ export type IngestShapeType = 'geo_shape' | 'shape' export interface IngestSimulateDocumentResult { doc?: IngestDocumentSimulation error?: ErrorCause - processor_results?: IngestPipelineSimulation[] + processor_results?: IngestPipelineProcessorResult[] } export interface IngestSortProcessor extends IngestProcessorBase {