From cf300c88ac746fdf58b8e7b3078e5a29c5e2b1db Mon Sep 17 00:00:00 2001 From: pquentin <42327+pquentin@users.noreply.github.com> Date: Sun, 29 Jun 2025 04:16:31 +0000 Subject: [PATCH] Update rest-api-spec --- output/openapi/elasticsearch-openapi.json | 4 +- .../elasticsearch-serverless-openapi.json | 4 +- output/schema/schema.json | 185 ++++++++++++++---- output/schema/validation-errors.json | 6 + output/typescript/types.ts | 15 +- package-lock.json | 48 ++--- package.json | 2 +- .../inference.put_amazonsagemaker.json | 35 ++++ .../_json_spec/inference.put_deepseek.json | 35 ++++ 9 files changed, 260 insertions(+), 74 deletions(-) create mode 100644 specification/_json_spec/inference.put_amazonsagemaker.json create mode 100644 specification/_json_spec/inference.put_deepseek.json diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index f5ef554b47..cabb3c651a 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -79265,7 +79265,7 @@ "settings" ] }, - "indices.get_alias.IndexAliases": { + "indices.get_alias._types.IndexAliases": { "type": "object", "properties": { "aliases": { @@ -105294,7 +105294,7 @@ "schema": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/indices.get_alias.IndexAliases" + "$ref": "#/components/schemas/indices.get_alias._types.IndexAliases" } } } diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index de43ba1f39..b3d56ec4f6 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -51179,7 +51179,7 @@ "settings" ] }, - "indices.get_alias.IndexAliases": { + "indices.get_alias._types.IndexAliases": { "type": "object", "properties": { "aliases": { @@ -64096,7 +64096,7 @@ "schema": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/indices.get_alias.IndexAliases" + "$ref": "#/components/schemas/indices.get_alias._types.IndexAliases" } } } diff --git a/output/schema/schema.json b/output/schema/schema.json index e3f3bac22f..e4095bbcee 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -9943,6 +9943,34 @@ } ] }, + { + "availability": { + "stack": { + "stability": "stable", + "visibility": "public" + } + }, + "description": "Configure a Amazon SageMaker inference endpoint", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-amazon-sagemaker.html", + "name": "inference.put_amazonsagemaker", + "request": null, + "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], + "response": null, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_inference/{task_type}/{amazonsagemaker_inference_id}" + } + ] + }, { "availability": { "serverless": { @@ -10127,6 +10155,34 @@ } ] }, + { + "availability": { + "stack": { + "stability": "stable", + "visibility": "public" + } + }, + "description": "Configure a DeepSeek inference endpoint", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-deepseek.html", + "name": "inference.put_deepseek", + "request": null, + "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], + "response": null, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_inference/{task_type}/{deepseek_inference_id}" + } + ] + }, { "availability": { "serverless": { @@ -151208,38 +151264,6 @@ }, "specLocation": "indices/get/IndicesGetResponse.ts#L24-L27" }, - { - "kind": "interface", - "name": { - "name": "IndexAliases", - "namespace": "indices.get_alias" - }, - "properties": [ - { - "name": "aliases", - "required": true, - "type": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - "singleKey": false, - "value": { - "kind": "instance_of", - "type": { - "name": "AliasDefinition", - "namespace": "indices._types" - } - } - } - } - ], - "specLocation": "indices/get_alias/IndicesGetAliasResponse.ts#L37-L39" - }, { "kind": "request", "attachedBehaviors": [ @@ -151391,7 +151415,7 @@ "kind": "instance_of", "type": { "name": "IndexAliases", - "namespace": "indices.get_alias" + "namespace": "indices.get_alias._types" } } } @@ -151407,7 +151431,7 @@ "kind": "instance_of", "type": { "name": "NotFoundAliases", - "namespace": "indices.get_alias" + "namespace": "indices.get_alias._types" } }, { @@ -151429,7 +151453,98 @@ "name": "Response", "namespace": "indices.get_alias" }, - "specLocation": "indices/get_alias/IndicesGetAliasResponse.ts#L26-L35" + "specLocation": "indices/get_alias/IndicesGetAliasResponse.ts#L28-L37" + }, + { + "kind": "interface", + "name": { + "name": "IndexAliases", + "namespace": "indices.get_alias._types" + }, + "properties": [ + { + "name": "aliases", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "AliasDefinition", + "namespace": "indices._types" + } + } + } + } + ], + "specLocation": "indices/get_alias/_types/response.ts#L24-L26" + }, + { + "kind": "interface", + "attachedBehaviors": [ + "AdditionalProperties" + ], + "behaviors": [ + { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "IndexAliases", + "namespace": "indices.get_alias._types" + } + } + ], + "type": { + "name": "AdditionalProperties", + "namespace": "_spec_utils" + } + } + ], + "name": { + "name": "NotFoundAliases", + "namespace": "indices.get_alias._types" + }, + "properties": [ + { + "name": "error", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "status", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "indices/get_alias/_types/response.ts#L28-L33" }, { "kind": "interface", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 829c2c8dc3..e9b82aef0b 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -55,6 +55,12 @@ ], "response": [] }, + "indices.get_alias": { + "request": [], + "response": [ + "interface definition indices.get_alias._types:NotFoundAliases / Behaviors - AdditionalProperties behavior for type 'indices.get_alias._types:NotFoundAliases' requires a 'behavior_meta' decorator with exactly 2 arguments (fieldname, description)" + ] + }, "ingest.get_ip_location_database": { "request": [ "Request: query parameter 'master_timeout' does not exist in the json spec" diff --git a/output/typescript/types.ts b/output/typescript/types.ts index a024c15802..b9c9713c23 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -12403,10 +12403,6 @@ export interface IndicesGetRequest extends RequestBase { export type IndicesGetResponse = Record -export interface IndicesGetAliasIndexAliases { - aliases: Record -} - export interface IndicesGetAliasRequest extends RequestBase { name?: Names index?: Indices @@ -12418,6 +12414,17 @@ export interface IndicesGetAliasRequest extends RequestBase { export type IndicesGetAliasResponse = Record +export interface IndicesGetAliasIndexAliases { + aliases: Record +} + +export interface IndicesGetAliasNotFoundAliasesKeys { + error: string + status: number +} +export type IndicesGetAliasNotFoundAliases = IndicesGetAliasNotFoundAliasesKeys + & { [property: string]: IndicesGetAliasIndexAliases | string | number } + export interface IndicesGetDataLifecycleDataStreamWithLifecycle { name: DataStreamName lifecycle?: IndicesDataStreamLifecycleWithRollover diff --git a/package-lock.json b/package-lock.json index d8f36c63ae..4068a6014b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@redocly/cli": "^1.34.3", + "@redocly/cli": "^1.34.4", "@stoplight/spectral-cli": "^6.14.2" } }, @@ -489,9 +489,9 @@ } }, "node_modules/@redocly/cli": { - "version": "1.34.3", - "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.34.3.tgz", - "integrity": "sha512-GJNBTMfm5wTCtH6K+RtPQZuGbqflMclXqAZ5My12tfux6xFDMW1l0MNd5RMpnIS1aeFcDX++P1gnnROWlesj4w==", + "version": "1.34.4", + "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.34.4.tgz", + "integrity": "sha512-seH/GgrjSB1EeOsgJ/4Ct6Jk2N7sh12POn/7G8UQFARMyUMJpe1oHtBwT2ndfp4EFCpgBAbZ/82Iw6dwczNxEA==", "license": "MIT", "dependencies": { "@opentelemetry/api": "1.9.0", @@ -500,13 +500,13 @@ "@opentelemetry/sdk-trace-node": "1.26.0", "@opentelemetry/semantic-conventions": "1.27.0", "@redocly/config": "^0.22.0", - "@redocly/openapi-core": "1.34.3", - "@redocly/respect-core": "1.34.3", + "@redocly/openapi-core": "1.34.4", + "@redocly/respect-core": "1.34.4", "abort-controller": "^3.0.0", "chokidar": "^3.5.1", "colorette": "^1.2.0", "core-js": "^3.32.1", - "dotenv": "^16.4.7", + "dotenv": "16.4.7", "form-data": "^4.0.0", "get-port-please": "^3.0.1", "glob": "^7.1.6", @@ -537,9 +537,9 @@ "license": "MIT" }, "node_modules/@redocly/openapi-core": { - "version": "1.34.3", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.3.tgz", - "integrity": "sha512-3arRdUp1fNx55itnjKiUhO6t4Mf91TsrTIYINDNLAZPS0TPd5YpiXRctwjel0qqWoOOhjA34cZ3m4dksLDFUYg==", + "version": "1.34.4", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.4.tgz", + "integrity": "sha512-hf53xEgpXIgWl3b275PgZU3OTpYh1RoD2LHdIfQ1JzBNTWsiNKczTEsI/4Tmh2N1oq9YcphhSMyk3lDh85oDjg==", "license": "MIT", "dependencies": { "@redocly/ajv": "^8.11.2", @@ -558,19 +558,19 @@ } }, "node_modules/@redocly/respect-core": { - "version": "1.34.3", - "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-1.34.3.tgz", - "integrity": "sha512-vo/gu7dRGwTVsRueVSjVk04jOQuL0w22RBJRdRUWkfyse791tYXgMCOx35ijKekL83Q/7Okxf/YX6UY1v5CAug==", + "version": "1.34.4", + "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-1.34.4.tgz", + "integrity": "sha512-MitKyKyQpsizA4qCVv+MjXL4WltfhFQAoiKiAzrVR1Kusro3VhYb6yJuzoXjiJhR0ukLP5QOP19Vcs7qmj9dZg==", "license": "MIT", "dependencies": { "@faker-js/faker": "^7.6.0", "@redocly/ajv": "8.11.2", - "@redocly/openapi-core": "1.34.3", + "@redocly/openapi-core": "1.34.4", "better-ajv-errors": "^1.2.0", "colorette": "^2.0.20", "concat-stream": "^2.0.0", "cookie": "^0.7.2", - "dotenv": "16.4.5", + "dotenv": "16.4.7", "form-data": "4.0.0", "jest-diff": "^29.3.1", "jest-matcher-utils": "^29.3.1", @@ -594,18 +594,6 @@ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "license": "MIT" }, - "node_modules/@redocly/respect-core/node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, "node_modules/@redocly/respect-core/node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -1961,9 +1949,9 @@ } }, "node_modules/dotenv": { - "version": "16.5.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz", - "integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==", + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", "license": "BSD-2-Clause", "engines": { "node": ">=12" diff --git a/package.json b/package.json index 894d629b9b..7b7b866599 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "transform-to-openapi": "npm run transform-to-openapi --prefix compiler --" }, "dependencies": { - "@redocly/cli": "^1.34.3", + "@redocly/cli": "^1.34.4", "@stoplight/spectral-cli": "^6.14.2" } } diff --git a/specification/_json_spec/inference.put_amazonsagemaker.json b/specification/_json_spec/inference.put_amazonsagemaker.json new file mode 100644 index 0000000000..e2cdb3ad25 --- /dev/null +++ b/specification/_json_spec/inference.put_amazonsagemaker.json @@ -0,0 +1,35 @@ +{ + "inference.put_amazonsagemaker": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-amazon-sagemaker.html", + "description": "Configure a Amazon SageMaker inference endpoint" + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_inference/{task_type}/{amazonsagemaker_inference_id}", + "methods": ["PUT"], + "parts": { + "task_type": { + "type": "string", + "description": "The task type" + }, + "amazonsagemaker_inference_id": { + "type": "string", + "description": "The inference Id" + } + } + } + ] + }, + "body": { + "description": "The inference endpoint's task and service settings" + } + } +} diff --git a/specification/_json_spec/inference.put_deepseek.json b/specification/_json_spec/inference.put_deepseek.json new file mode 100644 index 0000000000..e30b6bb8a7 --- /dev/null +++ b/specification/_json_spec/inference.put_deepseek.json @@ -0,0 +1,35 @@ +{ + "inference.put_deepseek": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-deepseek.html", + "description": "Configure a DeepSeek inference endpoint" + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_inference/{task_type}/{deepseek_inference_id}", + "methods": ["PUT"], + "parts": { + "task_type": { + "type": "string", + "description": "The task type" + }, + "deepseek_inference_id": { + "type": "string", + "description": "The inference Id" + } + } + } + ] + }, + "body": { + "description": "The inference endpoint's task and service settings" + } + } +}