diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_ai21.json b/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_ai21.json new file mode 100644 index 0000000000000..6d59087402068 --- /dev/null +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_ai21.json @@ -0,0 +1,35 @@ +{ + "inference.put_ai21": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-ai21.html", + "description": "Configure a AI21 inference endpoint" + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_inference/{task_type}/{ai21_inference_id}", + "methods": ["PUT"], + "parts": { + "task_type": { + "type": "string", + "description": "The task type" + }, + "ai21_inference_id": { + "type": "string", + "description": "The inference ID" + } + } + } + ] + }, + "body": { + "description": "The inference endpoint's task and service settings" + } + } +} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_llama.json b/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_llama.json new file mode 100644 index 0000000000000..5551f655cb616 --- /dev/null +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_llama.json @@ -0,0 +1,35 @@ +{ + "inference.put_llama": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-llama.html", + "description": "Configure a Llama inference endpoint" + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_inference/{task_type}/{llama_inference_id}", + "methods": ["PUT"], + "parts": { + "task_type": { + "type": "string", + "description": "The task type" + }, + "llama_inference_id": { + "type": "string", + "description": "The inference ID" + } + } + } + ] + }, + "body": { + "description": "The inference endpoint's task and service settings" + } + } +} diff --git a/rest-api-spec/src/main/resources/schema.json b/rest-api-spec/src/main/resources/schema.json index 02fdd920f9216..24b75aabefa89 100644 --- a/rest-api-spec/src/main/resources/schema.json +++ b/rest-api-spec/src/main/resources/schema.json @@ -6,12 +6,12 @@ "Api": { "type": "object", "propertyNames": { - "pattern": "^(?:[a-z]+?(_[a-z]+)*(\\.[a-z]+?(_[a-z]+)*)?|_internal\\.[a-z]+?(_[a-z]+)*)$" + "pattern": "^(?:[a-z][a-z0-9]*?(_[a-z0-9]+)*(\\.[a-z][a-z0-9]*?(_[a-z0-9]+)*)?|_internal\\.[a-z][a-z0-9]*?(_[a-z0-9]+)*)$" }, "minProperties": 1, "maxProperties": 1, "patternProperties": { - "^(?:[a-z]+?(_[a-z]+)*(\\.[a-z]+?(_[a-z]+)*)?|_internal\\.[a-z]+?(_[a-z]+)*)$": { + "^(?:[a-z][a-z0-9]*?(_[a-z0-9]+)*(\\.[a-z][a-z0-9]*?(_[a-z0-9]+)*)?|_internal\\.[a-z][a-z0-9]*?(_[a-z0-9]+)*)$": { "$ref": "#/definitions/Components" } }, @@ -135,10 +135,10 @@ "type": "object", "additionalProperties": true, "propertyNames": { - "pattern": "^_?[a-z]+?(_[a-z]+)*$" + "pattern": "^_?[a-z][a-z0-9]*?(_[a-z0-9]+)*$" }, "patternProperties": { - "^_?[a-z]+?(_[a-z]+)*$": { + "^_?[a-z][a-z0-9]*?(_[a-z0-9]+)*$": { "$ref": "#/definitions/ParamPart" } }, @@ -232,10 +232,10 @@ "type": "object", "additionalProperties": true, "propertyNames": { - "pattern": "^_?[a-z]+?(_[a-z]+)*$" + "pattern": "^_?[a-z][a-z0-9]*?(_[a-z0-9]+)*$" }, "patternProperties": { - "^_?[a-z]+?(_[a-z]+)*$": { + "^_?[a-z][a-z0-9]*?(_[a-z0-9]+)*$": { "$ref": "#/definitions/ParamPart" } },