From 273ff9266cb6b144dcce576aba0ec42e8ac908ba Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Sun, 8 Oct 2017 11:38:45 +0100 Subject: [PATCH 1/2] Update schema to reject version type strings, like "true" instead `true` --- compat-data.schema.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/compat-data.schema.json b/compat-data.schema.json index 80a065e0deb4c1..8ad4ae945e4d63 100644 --- a/compat-data.schema.json +++ b/compat-data.schema.json @@ -18,8 +18,8 @@ "required": ["type", "name"] }, "partial_implementation": { "type": "boolean" }, - "version_added": { "type": ["string", "boolean", "null"] }, - "version_removed": { "type": ["string", "boolean", "null"] }, + "version_added": { "$ref": "#/definitions/version_value" }, + "version_removed": { "$ref": "#/definitions/version_value" }, "notes": { "anyOf": [ { @@ -109,6 +109,13 @@ "^(?!__compat|.*\\.).+$" : { "$ref": "#/definitions/identifier" } }, "additionalProperties": false + }, + + "version_value": { + "allOf": [ + { "type": ["string", "boolean", "null"] }, + { "not": { "enum": ["true", "false", "null"] } } + ] } }, From 0b4190464c0732447215be68f4f54df6042ac98c Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Sun, 8 Oct 2017 11:39:25 +0100 Subject: [PATCH 2/2] fix A tag version_added strings for schema change --- html/elements/a.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/elements/a.json b/html/elements/a.json index 81516fdab27d31..01bd95cdef83dc 100644 --- a/html/elements/a.json +++ b/html/elements/a.json @@ -502,10 +502,10 @@ "version_added": false }, "safari": { - "version_added": "false" + "version_added": false }, "safari_ios": { - "version_added": "false" + "version_added": false } }, "status": {