From 2fd308851eddc95b9ef477b29d6d8117f7d91b13 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Wed, 7 May 2025 03:35:40 -0700 Subject: [PATCH] Add reason to migration.post_feature_upgrade APi (#4233) (cherry picked from commit 7a7e2a257032dcadda0f1aeec9344598a2e12913) --- output/openapi/elasticsearch-openapi.json | 6 ++++-- output/schema/schema.json | 17 ++++++++++++++--- output/typescript/types.ts | 3 ++- .../PostFeatureUpgradeResponse.ts | 3 ++- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 27ac24d363..d904951abb 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -21230,11 +21230,13 @@ "items": { "$ref": "#/components/schemas/migration.post_feature_upgrade.MigrationFeature" } + }, + "reason": { + "type": "string" } }, "required": [ - "accepted", - "features" + "accepted" ] }, "examples": { diff --git a/output/schema/schema.json b/output/schema/schema.json index a05601bf59..d4dd2b6d51 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -167023,7 +167023,7 @@ } } ], - "specLocation": "migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L27-L29" + "specLocation": "migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L28-L30" }, { "kind": "request", @@ -167066,7 +167066,7 @@ }, { "name": "features", - "required": true, + "required": false, "type": { "kind": "array_of", "value": { @@ -167077,6 +167077,17 @@ } } } + }, + { + "name": "reason", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } } ] }, @@ -167090,7 +167101,7 @@ "name": "Response", "namespace": "migration.post_feature_upgrade" }, - "specLocation": "migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L20-L25" + "specLocation": "migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L20-L26" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 01e5f39850..85d74ac4a4 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -14822,7 +14822,8 @@ export interface MigrationPostFeatureUpgradeRequest extends RequestBase { export interface MigrationPostFeatureUpgradeResponse { accepted: boolean - features: MigrationPostFeatureUpgradeMigrationFeature[] + features?: MigrationPostFeatureUpgradeMigrationFeature[] + reason?: string } export interface MlAdaptiveAllocationsSettings { diff --git a/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts b/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts index 4007fd899b..6c5602ae30 100644 --- a/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts +++ b/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts @@ -20,7 +20,8 @@ export class Response { body: { accepted: boolean - features: MigrationFeature[] + features?: MigrationFeature[] + reason?: string } }