From 952a3b64d0444511de600c7a761f0217145f8d36 Mon Sep 17 00:00:00 2001 From: "Michael[tm] Smith" Date: Mon, 3 May 2021 18:39:46 +0900 Subject: [PATCH 1/2] Make JSON schema allow WebGL extension spec URLs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have 61 features with https://www.khronos.org/registry/webgl/extensions/ spec URLs. All https://www.khronos.org/registry/webgl/extensions/ specs lack any ID/anchors at all, and therefore don’t conform to the JSON schema requirement in the compat-data.schema.json file for spec_url values to have a fragment identifier. So this change updates the schema to allow any URLs matching the following pattern: ^https://www.khronos.org/registry/webgl/extensions/[^/]+/ Otherwise, without this change, our CI fails on all those URLs, because it expects to find the required fragment identifier in each of them. --- schemas/compat-data.schema.json | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/schemas/compat-data.schema.json b/schemas/compat-data.schema.json index c57184963ba8ee..d649d4a4eeaa2d 100644 --- a/schemas/compat-data.schema.json +++ b/schemas/compat-data.schema.json @@ -170,6 +170,12 @@ } }, + "spec_url_value": { + "type": "string", + "format": "uri", + "pattern": "(^http(s)?:\/\/[^#]+#.+)|(^https://www.khronos.org/registry/webgl/extensions/[^/]+/)" + }, + "compat_statement": { "type": "object", "properties": { @@ -186,17 +192,13 @@ "spec_url": { "anyOf": [ { - "type": "string", - "format": "uri", - "pattern": "^http(s)?:\/\/[^#]+#.+" + "$ref": "#/definitions/spec_url_value" }, { "type": "array", "minItems": 2, "items": { - "type": "string", - "format": "uri", - "pattern": "^http(s)?:\/\/[^#]+#.+" + "$ref": "#/definitions/spec_url_value" } } ], From da23b0625cda47404a4e67d056fe1532ba9887d6 Mon Sep 17 00:00:00 2001 From: "Michael[tm] Smith" Date: Tue, 11 May 2021 11:46:44 +0900 Subject: [PATCH 2/2] Update compat-data-schema.md to note WebGL extension spec URLs --- schemas/compat-data-schema.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/compat-data-schema.md b/schemas/compat-data-schema.md index 5cdf2e2a4ede6d..08e644d2b64e0c 100644 --- a/schemas/compat-data-schema.md +++ b/schemas/compat-data-schema.md @@ -107,7 +107,7 @@ The `__compat` object consists of the following: - An optional `mdn_url` property which **points to an MDN reference page documenting the feature**. It needs to be a valid URL, and should be the language-neutral URL (e.g. use `https://developer.mozilla.org/docs/Web/CSS/text-align` instead of `https://developer.mozilla.org/en-US/docs/Web/CSS/text-align`). -- An optional `spec_url` property as a URL or an array of URLs, each of which is for a specific part of a specification in which this feature is defined. Each URL must contain a fragment identifier (e.g. `https://tc39.es/proposal-promise-allSettled/#sec-promise.allsettled`). +- An optional `spec_url` property as a URL or an array of URLs, each of which is for a specific part of a specification in which this feature is defined. Each URL must either contain a fragment identifier (e.g. `https://tc39.es/proposal-promise-allSettled/#sec-promise.allsettled`), or else must match the regular-expression pattern `^https://www.khronos.org/registry/webgl/extensions/[^/]+/` (e.g. `https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/`). ### The `support` object