From 7e488ce6e3493bd32d68e4c0aa8f97a658d07131 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Thu, 19 Dec 2024 16:25:08 +0100 Subject: [PATCH] avoiding container extension --- 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 94de5772b8..715620058c 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -70718,7 +70718,15 @@ "ingest._types:DatabaseConfigurationFull": { "allOf": [ { - "$ref": "#/components/schemas/ingest._types:DatabaseConfiguration" + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/_types:Name" + } + }, + "required": [ + "name" + ] }, { "type": "object", @@ -70728,8 +70736,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 bd918dbdb7..0e58f1b233 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -143197,12 +143197,6 @@ }, { "kind": "interface", - "inherits": { - "type": { - "name": "DatabaseConfiguration", - "namespace": "ingest._types" - } - }, "name": { "name": "DatabaseConfigurationFull", "namespace": "ingest._types" @@ -143229,9 +143223,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", @@ -144701,7 +144733,7 @@ "namespace": "ingest._types" }, "properties": [], - "specLocation": "ingest/_types/Database.ts#L48-L48" + "specLocation": "ingest/_types/Database.ts#L59-L59" }, { "kind": "interface", @@ -145029,7 +145061,7 @@ } } ], - "specLocation": "ingest/_types/Database.ts#L52-L54" + "specLocation": "ingest/_types/Database.ts#L63-L65" }, { "kind": "interface", @@ -145104,7 +145136,7 @@ } } ], - "specLocation": "ingest/_types/Database.ts#L44-L46" + "specLocation": "ingest/_types/Database.ts#L55-L57" }, { "kind": "interface", @@ -147221,7 +147253,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 bfe38b2423..0d46abd8f5 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -12907,9 +12907,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 {