From 3b4552469c277208e62c41e240cea0db08d906e9 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Tue, 28 Oct 2025 12:10:48 +0100 Subject: [PATCH] using mapping syntax, models can be {} (null) Signed-off-by: Nicolas De Loof --- schema/compose-spec.json | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/schema/compose-spec.json b/schema/compose-spec.json index 5db97d0f..15e818dc 100644 --- a/schema/compose-spec.json +++ b/schema/compose-spec.json @@ -531,19 +531,24 @@ {"type": "object", "patternProperties": { "^[a-zA-Z0-9._-]+$": { - "type": "object", - "properties": { - "endpoint_var": { - "type": "string", - "description": "Environment variable set to AI model endpoint." + "oneOf": [ + { + "type": "object", + "properties": { + "endpoint_var": { + "type": "string", + "description": "Environment variable set to AI model endpoint." + }, + "model_var": { + "type": "string", + "description": "Environment variable set to AI model name." + } + }, + "additionalProperties": false, + "patternProperties": {"^x-": {}} }, - "model_var": { - "type": "string", - "description": "Environment variable set to AI model name." - } - }, - "additionalProperties": false, - "patternProperties": {"^x-": {}} + {"type": "null"} + ] } } }