From 07952d9f8615cade1b2a2747574f8e8846837a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Saint-F=C3=A9lix?= Date: Wed, 27 Nov 2024 16:59:57 +0100 Subject: [PATCH 1/2] change data type from array to union --- specification/nodes/info/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/nodes/info/types.ts b/specification/nodes/info/types.ts index efbba52df9..1d47901284 100644 --- a/specification/nodes/info/types.ts +++ b/specification/nodes/info/types.ts @@ -159,7 +159,7 @@ export class NodeInfoPath { logs?: string home?: string repo?: string[] - data?: string[] + data?: string | string[] } export class NodeInfoRepositories { From 7f855477548bb38b0fa7c8174cbdded96abf9580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Saint-F=C3=A9lix?= Date: Wed, 27 Nov 2024 17:16:12 +0100 Subject: [PATCH 2/2] make contrib --- output/openapi/elasticsearch-openapi.json | 15 +++++++++---- output/schema/schema.json | 26 +++++++++++++++++------ output/typescript/types.ts | 2 +- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 3087b5fdf4..f7d166eef5 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -78352,10 +78352,17 @@ } }, "data": { - "type": "array", - "items": { - "type": "string" - } + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] } } }, diff --git a/output/schema/schema.json b/output/schema/schema.json index 7fa7b55def..747aa8440b 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -180296,14 +180296,26 @@ "name": "data", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } } - } + ] } } ], diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 8b06c657ad..b60a188f0c 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -16857,7 +16857,7 @@ export interface NodesInfoNodeInfoPath { logs?: string home?: string repo?: string[] - data?: string[] + data?: string | string[] } export interface NodesInfoNodeInfoRepositories {