From a855e016142281e25d572bd42435d2fc185c5f03 Mon Sep 17 00:00:00 2001 From: lekaf974 Date: Wed, 20 May 2026 22:20:32 -0400 Subject: [PATCH] feat: add support for additional file and volume definitions in score schema Signed-off-by: lekaf974 --- samples/score-full.yaml | 2 ++ score-v1b1.json | 42 +++++++++++++++++++++++++++-------------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/samples/score-full.yaml b/samples/score-full.yaml index e8c202d..5e70b1a 100644 --- a/samples/score-full.yaml +++ b/samples/score-full.yaml @@ -36,6 +36,7 @@ containers: content /my/other/binaryfile: binaryContent: ADBgwpA= + /my/other/file-short: "some content here" volumes: /mnt/something: source: volume-name @@ -43,6 +44,7 @@ containers: readOnly: false /mnt/something-else: source: volume-two + /mnt/something-short: "volume-short" livenessProbe: httpGet: port: 8080 diff --git a/score-v1b1.json b/score-v1b1.json index bb967ea..a42ccfa 100644 --- a/score-v1b1.json +++ b/score-v1b1.json @@ -322,16 +322,23 @@ { "type": "object", "additionalProperties": { - "allOf": [ + "oneOf": [ { - "not": { - "type": "object", - "additionalProperties": true, - "required": ["target"] - } + "allOf": [ + { + "not": { + "type": "object", + "additionalProperties": true, + "required": ["target"] + } + }, + { + "$ref": "#/$defs/containerFile" + } + ] }, { - "$ref": "#/$defs/containerFile" + "type": "string" } ] } @@ -351,16 +358,23 @@ { "type": "object", "additionalProperties": { - "allOf": [ + "oneOf": [ { - "not": { - "type": "object", - "additionalProperties": true, - "required": ["target"] - } + "allOf": [ + { + "not": { + "type": "object", + "additionalProperties": true, + "required": ["target"] + } + }, + { + "$ref": "#/$defs/containerVolume" + } + ] }, { - "$ref": "#/$defs/containerVolume" + "type": "string" } ] }