From 3d96cf6daa12ed0442c8a7083a653d8eb5b8a384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petter=20Walb=C3=B8=20Johnsg=C3=A5rd?= Date: Fri, 5 Nov 2021 17:56:50 +0100 Subject: [PATCH] Blocks: Update schema to require either a type or an enum Part of #35902. Update the block.json schema to require either a `type` or an `enum` prop. --- schemas/json/block.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/schemas/json/block.json b/schemas/json/block.json index e3a90d9045bd2e..a9d98f64fb1f8e 100644 --- a/schemas/json/block.json +++ b/schemas/json/block.json @@ -139,7 +139,14 @@ "description": "TA block attribute can contain a default value, which will be used if the type and source do not match anything within the block content.\n\nThe value is provided by the default field, and the value should match the expected format of the attribute." } }, - "required": [ "type" ] + "anyOf": [ + { + "required": [ "type" ] + }, + { + "required": [ "enum" ] + } + ] } }, "additionalProperties": false