From eb72527c1a750dcb91d5674c8993e1a35f8e55b4 Mon Sep 17 00:00:00 2001 From: Laura Trotta <153528055+l-trotta@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:45:21 +0100 Subject: [PATCH] avoiding container extension (#3373) (cherry picked from commit 435b8e796d89e583c87334292c08b4e366d8abfb) --- output/openapi/elasticsearch-openapi.json | 20 ++++++++- output/schema/schema.json | 54 ++++++++++++++++++----- output/typescript/types.ts | 5 ++- specification/ingest/_types/Database.ts | 13 +++++- 4 files changed, 77 insertions(+), 15 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 140f244468..e0c3c6a7f7 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -70665,7 +70665,15 @@ "ingest._types:DatabaseConfigurationFull": { "allOf": [ { - "$ref": "#/components/schemas/ingest._types:DatabaseConfiguration" + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/_types:Name" + } + }, + "required": [ + "name" + ] }, { "type": "object", @@ -70675,8 +70683,16 @@ }, "local": { "$ref": "#/components/schemas/ingest._types:Local" + }, + "maxmind": { + "$ref": "#/components/schemas/ingest._types:Maxmind" + }, + "ipinfo": { + "$ref": "#/components/schemas/ingest._types:Ipinfo" } - } + }, + "minProperties": 1, + "maxProperties": 1 } ] }, diff --git a/output/schema/schema.json b/output/schema/schema.json index ea5833d88e..51864c6e46 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -143017,12 +143017,6 @@ }, { "kind": "interface", - "inherits": { - "type": { - "name": "DatabaseConfiguration", - "namespace": "ingest._types" - } - }, "name": { "name": "DatabaseConfigurationFull", "namespace": "ingest._types" @@ -143049,9 +143043,47 @@ "namespace": "ingest._types" } } + }, + { + "containerProperty": true, + "description": "The provider-assigned name of the IP geolocation database to download.", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + } + }, + { + "name": "maxmind", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Maxmind", + "namespace": "ingest._types" + } + } + }, + { + "name": "ipinfo", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Ipinfo", + "namespace": "ingest._types" + } + } } ], - "specLocation": "ingest/_types/Database.ts#L39-L42" + "specLocation": "ingest/_types/Database.ts#L39-L53", + "variants": { + "kind": "container" + } }, { "kind": "interface", @@ -144521,7 +144553,7 @@ "namespace": "ingest._types" }, "properties": [], - "specLocation": "ingest/_types/Database.ts#L48-L48" + "specLocation": "ingest/_types/Database.ts#L59-L59" }, { "kind": "interface", @@ -144849,7 +144881,7 @@ } } ], - "specLocation": "ingest/_types/Database.ts#L52-L54" + "specLocation": "ingest/_types/Database.ts#L63-L65" }, { "kind": "interface", @@ -144924,7 +144956,7 @@ } } ], - "specLocation": "ingest/_types/Database.ts#L44-L46" + "specLocation": "ingest/_types/Database.ts#L55-L57" }, { "kind": "interface", @@ -147041,7 +147073,7 @@ "namespace": "ingest._types" }, "properties": [], - "specLocation": "ingest/_types/Database.ts#L50-L50" + "specLocation": "ingest/_types/Database.ts#L61-L61" }, { "kind": "request", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 438465fdc9..01ab17b55e 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -12893,9 +12893,12 @@ export interface IngestDatabaseConfiguration { ipinfo?: IngestIpinfo } -export interface IngestDatabaseConfigurationFull extends IngestDatabaseConfiguration { +export interface IngestDatabaseConfigurationFull { web?: IngestWeb local?: IngestLocal + name: Name + maxmind?: IngestMaxmind + ipinfo?: IngestIpinfo } export interface IngestDateIndexNameProcessor extends IngestProcessorBase { diff --git a/specification/ingest/_types/Database.ts b/specification/ingest/_types/Database.ts index 3210d86da8..bb3a9e4475 100644 --- a/specification/ingest/_types/Database.ts +++ b/specification/ingest/_types/Database.ts @@ -36,9 +36,20 @@ export class DatabaseConfiguration { ipinfo?: Ipinfo } -export class DatabaseConfigurationFull extends DatabaseConfiguration { +/** + * @variants container + */ +export class DatabaseConfigurationFull { web?: Web local?: Local + /** + * The provider-assigned name of the IP geolocation database to download. + * @variant container_property + */ + name: Name + + maxmind?: Maxmind + ipinfo?: Ipinfo } export class Maxmind {