From e6daa559b53f7c02e36b43ff9ebcd6b3e5d705fe 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 3fbe133859..5007cbb878 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -70153,7 +70153,15 @@ "ingest._types:DatabaseConfigurationFull": { "allOf": [ { - "$ref": "#/components/schemas/ingest._types:DatabaseConfiguration" + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/_types:Name" + } + }, + "required": [ + "name" + ] }, { "type": "object", @@ -70163,8 +70171,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 21a450a71f..19a6c3d521 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -142169,12 +142169,6 @@ }, { "kind": "interface", - "inherits": { - "type": { - "name": "DatabaseConfiguration", - "namespace": "ingest._types" - } - }, "name": { "name": "DatabaseConfigurationFull", "namespace": "ingest._types" @@ -142201,9 +142195,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", @@ -143673,7 +143705,7 @@ "namespace": "ingest._types" }, "properties": [], - "specLocation": "ingest/_types/Database.ts#L48-L48" + "specLocation": "ingest/_types/Database.ts#L59-L59" }, { "kind": "interface", @@ -144001,7 +144033,7 @@ } } ], - "specLocation": "ingest/_types/Database.ts#L52-L54" + "specLocation": "ingest/_types/Database.ts#L63-L65" }, { "kind": "interface", @@ -144076,7 +144108,7 @@ } } ], - "specLocation": "ingest/_types/Database.ts#L44-L46" + "specLocation": "ingest/_types/Database.ts#L55-L57" }, { "kind": "interface", @@ -146193,7 +146225,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 fc74ee4076..b803fc7594 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -12854,9 +12854,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 {