Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make JSON schema allow WebGL extension spec URLs #10353

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion schemas/compat-data-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 8 additions & 6 deletions schemas/compat-data.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
}
}
],
Expand Down