From 90b09673b22aa4537a2339470dc123d03f167f3b Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Thu, 8 Feb 2024 14:07:04 +0400 Subject: [PATCH] Fix synonyms/put_synonym_rule body (#2407) synonyms is not a list, but a string in Solr format. --- output/openapi/elasticsearch-serverless-openapi.json | 5 +---- output/schema/schema.json | 11 ++++------- output/typescript/types.ts | 2 +- .../put_synonym_rule/SynonymRulePutRequest.ts | 2 +- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 24bda6f4db..be4b736b06 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -16622,10 +16622,7 @@ "type": "object", "properties": { "synonyms": { - "type": "array", - "items": { - "$ref": "#/components/schemas/synonyms._types:SynonymString" - } + "$ref": "#/components/schemas/synonyms._types:SynonymString" } }, "required": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index 1a8faf8c4b..4e94e19611 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -186142,13 +186142,10 @@ "name": "synonyms", "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "SynonymString", - "namespace": "synonyms._types" - } + "kind": "instance_of", + "type": { + "name": "SynonymString", + "namespace": "synonyms._types" } } } diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 487c9294f8..9498f1d415 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -17668,7 +17668,7 @@ export interface SynonymsPutSynonymRuleRequest extends RequestBase { set_id: Id rule_id: Id body?: { - synonyms: SynonymsSynonymString[] + synonyms: SynonymsSynonymString } } diff --git a/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts b/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts index bae6a60ae1..6da2fda220 100644 --- a/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts +++ b/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts @@ -42,6 +42,6 @@ export interface Request extends RequestBase { * The synonym rule information to update */ body: { - synonyms: SynonymString[] + synonyms: SynonymString } }