From 5da355733113c6d61f22ff74c7e00fc65e01b253 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Tue, 22 Jun 2021 23:04:40 +0100 Subject: [PATCH] Fix test.json schema for 'matrix' I'm not sure what the current schema is describing, but it's not doing anything useful to validate 'matrix' entries, as I discover when I come to add something to that. 'matrix' is a dict with possible keys 'options' and 'exclude'. 'options' is a dict with arbitrary keys, whose's values are arrays Once we describe those dicts correctly, also fix that 'val' keys may be string, boolean or null, and the corresponding 'exclude' keys may be string or boolean. v2: Also allow 'val' and 'exclude' to be an array of strings. --- data/test.schema.json | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/data/test.schema.json b/data/test.schema.json index 43c1392c1..00c52aef6 100644 --- a/data/test.schema.json +++ b/data/test.schema.json @@ -54,16 +54,19 @@ }, "matrix": { "type": "object", - "additionalProperties": { - "properties": { - "options": { + "properties": { + "options": { + "additionalProperties": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "val": { - "type": "string" + "type": ["string", "boolean", "null", "array"], + "items": { + "type": "string" + } }, "compilers": { "type": "object", @@ -88,7 +91,10 @@ "items": { "type": "object", "additionalProperties": { - "type": "string" + "type": ["string", "boolean", "array"], + "items": { + "type": "string" + } } } }