From 01f3e9d213ae2aff39eab2a0c558cd04bd085f0e Mon Sep 17 00:00:00 2001 From: David Kyle Date: Tue, 16 Apr 2024 11:43:39 +0100 Subject: [PATCH] Add GET _inference --- .../elasticsearch-serverless-openapi.json | 22 +++++++++++++++++-- output/schema/schema.json | 8 ++++++- output/typescript/types.ts | 2 +- .../_json_spec/inference.get_model.json | 4 ++++ .../inference/get_model/GetModelRequest.ts | 2 +- 5 files changed, 33 insertions(+), 5 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index f11391d89f..49fc0f697b 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -8700,7 +8700,7 @@ "externalDocs": { "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html" }, - "operationId": "inference-get-model", + "operationId": "inference-get-model-1", "parameters": [ { "$ref": "#/components/parameters/inference.get_model#inference_id" @@ -8795,7 +8795,7 @@ "externalDocs": { "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html" }, - "operationId": "inference-get-model-1", + "operationId": "inference-get-model-2", "parameters": [ { "$ref": "#/components/parameters/inference.get_model#task_type" @@ -8892,6 +8892,24 @@ } } }, + "/_inference": { + "get": { + "tags": [ + "inference.get_model" + ], + "summary": "Get a model in the Inference API", + "description": "Get a model in the Inference API", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html" + }, + "operationId": "inference-get-model", + "responses": { + "200": { + "$ref": "#/components/responses/inference.get_model#200" + } + } + } + }, "/": { "get": { "tags": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index f6f06413c9..b2ad8759b3 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -8376,6 +8376,12 @@ "since": "8.11.0", "stability": "experimental", "urls": [ + { + "methods": [ + "GET" + ], + "path": "/_inference" + }, { "methods": [ "GET" @@ -133241,7 +133247,7 @@ { "description": "The inference Id", "name": "inference_id", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 8c220a346c..c8be52c863 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -11993,7 +11993,7 @@ export type InferenceDeleteModelResponse = AcknowledgedResponseBase export interface InferenceGetModelRequest extends RequestBase { task_type?: InferenceTaskType - inference_id: Id + inference_id?: Id } export interface InferenceGetModelResponse { diff --git a/specification/_json_spec/inference.get_model.json b/specification/_json_spec/inference.get_model.json index f0f68e5474..5f76b48e8e 100644 --- a/specification/_json_spec/inference.get_model.json +++ b/specification/_json_spec/inference.get_model.json @@ -11,6 +11,10 @@ }, "url": { "paths": [ + { + "path": "/_inference", + "methods": ["GET"] + }, { "path": "/_inference/{inference_id}", "methods": ["GET"], diff --git a/specification/inference/get_model/GetModelRequest.ts b/specification/inference/get_model/GetModelRequest.ts index b8514b298f..4fa6f0597e 100644 --- a/specification/inference/get_model/GetModelRequest.ts +++ b/specification/inference/get_model/GetModelRequest.ts @@ -36,6 +36,6 @@ export interface Request extends RequestBase { /** * The inference Id */ - inference_id: Id + inference_id?: Id } }