diff --git a/inputs/org.osbuild.files b/inputs/org.osbuild.files index ef75ac3f..5dc2d90f 100755 --- a/inputs/org.osbuild.files +++ b/inputs/org.osbuild.files @@ -34,6 +34,26 @@ SCHEMA = r""" "additionalProperties": false } } + }, + "plain-ref": { + "type": "array", + "items": { + "type": "string" + } + }, + "object-ref": { + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": false, + "properties": { + "metadata": {"$ref": "#/definitions/metadata"} + } + } + } } }, "required": ["type", "origin", "references"], @@ -48,25 +68,10 @@ SCHEMA = r""" }, "references": { "description": "Checksums of files to use as files input", - "oneOf": [{ - "type": "array", - "items": { - "type": "string" - } - }, { - "type": "object", - "additionalProperties": false, - "minProperties": 1, - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": false, - "properties": { - "metadata": {"$ref": "#/definitions/metadata"} - } - } - } - }] + "oneOf": [ + {"$ref": "#/definitions/plain-ref"}, + {"$ref": "#/definitions/object-ref"} + ] } } """