From 8622ea63812cba58e5ac3e0ffd4c0b7eecde54d8 Mon Sep 17 00:00:00 2001 From: Alexander Voss Date: Fri, 6 Oct 2023 03:53:01 -0400 Subject: [PATCH] Updated JSON schema (#6146) * added missing "unrecognized_links" * changed "definitions" to "$defs" "$defs" is where people would expect definitions of reusable subschemas to live --- docs/schema/extensions/markdown.json | 6 ++-- docs/schema/extra.json | 12 +++---- docs/schema/plugins.json | 8 ++--- docs/schema/plugins/search.json | 6 ++-- docs/schema/theme.json | 50 ++++++++++++++-------------- docs/schema/validation.json | 1 + 6 files changed, 42 insertions(+), 41 deletions(-) diff --git a/docs/schema/extensions/markdown.json b/docs/schema/extensions/markdown.json index a1275d5ba..0de7f1fba 100644 --- a/docs/schema/extensions/markdown.json +++ b/docs/schema/extensions/markdown.json @@ -73,10 +73,10 @@ "type": "object", "properties": { "toc": { - "$ref": "#/definitions/toc" + "$ref": "#/$defs/toc" }, "markdown.extensions.toc": { - "$ref": "#/definitions/toc" + "$ref": "#/$defs/toc" } }, "additionalProperties": false @@ -92,7 +92,7 @@ ] } ], - "definitions": { + "$defs": { "toc": { "title": "Table Of Contents – Python Markdown", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown/#table-of-contents", diff --git a/docs/schema/extra.json b/docs/schema/extra.json index b2a3db6ad..c53f418fa 100644 --- a/docs/schema/extra.json +++ b/docs/schema/extra.json @@ -68,7 +68,7 @@ "type": "object", "properties": { "icon": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "name": { "title": "Feedback rating name", @@ -170,15 +170,15 @@ "type": "object", "properties": { "analytics": { - "$ref": "#/definitions/cookie" + "$ref": "#/$defs/cookie" }, "github": { - "$ref": "#/definitions/cookie" + "$ref": "#/$defs/cookie" } }, "patternProperties": { "\\w+": { - "$ref": "#/definitions/cookie" + "$ref": "#/$defs/cookie" } }, "additionalProperties": false, @@ -261,7 +261,7 @@ "type": "object", "properties": { "icon": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "link": { "title": "Social link", @@ -364,7 +364,7 @@ } }, "additionalProperties": true, - "definitions": { + "$defs": { "cookie": { "title": "Cookie", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#cookie-consent", diff --git a/docs/schema/plugins.json b/docs/schema/plugins.json index c25767d58..1f1c99b1b 100644 --- a/docs/schema/plugins.json +++ b/docs/schema/plugins.json @@ -6,19 +6,19 @@ "items": { "anyOf": [ { - "$ref": "#/definitions/built-in" + "$ref": "#/$defs/built-in" }, { - "$ref": "#/definitions/external" + "$ref": "#/$defs/external" }, { - "$ref": "#/definitions/external-community" + "$ref": "#/$defs/external-community" } ] }, "uniqueItems": true, "minItems": 1, - "definitions": { + "$defs": { "built-in": { "description": "Built-in plugins", "anyOf": [ diff --git a/docs/schema/plugins/search.json b/docs/schema/plugins/search.json index 68112b917..45b8988fd 100644 --- a/docs/schema/plugins/search.json +++ b/docs/schema/plugins/search.json @@ -18,12 +18,12 @@ "lang": { "oneOf": [ { - "$ref": "#/definitions/lang" + "$ref": "#/$defs/lang" }, { "type": "array", "items": { - "$ref": "#/definitions/lang" + "$ref": "#/$defs/lang" }, "uniqueItems": true, "minItems": 1 @@ -66,7 +66,7 @@ "additionalProperties": false } ], - "definitions": { + "$defs": { "lang": { "title": "Site search language", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/search/#config.lang", diff --git a/docs/schema/theme.json b/docs/schema/theme.json index 69abeff64..5a93df098 100644 --- a/docs/schema/theme.json +++ b/docs/schema/theme.json @@ -455,16 +455,16 @@ "type": "object", "properties": { "edit": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "view": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "logo": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "repo": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "admonition": { "title": "Admonition icon", @@ -472,40 +472,40 @@ "type": "object", "properties": { "note": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "abstract": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "info": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "tip": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "success": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "question": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "warning": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "failure": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "danger": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "bug": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "example": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "quote": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" } }, "additionalProperties": false, @@ -566,7 +566,7 @@ "type": "object", "patternProperties": { "^[\\w-]+$": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" } }, "additionalProperties": false @@ -796,13 +796,13 @@ "type": "object", "properties": { "scheme": { - "$ref": "#/definitions/scheme" + "$ref": "#/$defs/scheme" }, "primary": { - "$ref": "#/definitions/primary" + "$ref": "#/$defs/primary" }, "accent": { - "$ref": "#/definitions/accent" + "$ref": "#/$defs/accent" } }, "additionalProperties": false @@ -815,13 +815,13 @@ "type": "object", "properties": { "scheme": { - "$ref": "#/definitions/scheme" + "$ref": "#/$defs/scheme" }, "primary": { - "$ref": "#/definitions/primary" + "$ref": "#/$defs/primary" }, "accent": { - "$ref": "#/definitions/accent" + "$ref": "#/$defs/accent" }, "media": { "oneOf": [ @@ -850,7 +850,7 @@ "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#color-palette-toggle", "properties": { "icon": { - "$ref": "#/definitions/icon" + "$ref": "#/$defs/icon" }, "name": { "title": "Color palette toggle name", @@ -917,7 +917,7 @@ "required": [ "name" ], - "definitions": { + "$defs": { "scheme": { "title": "Color scheme", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#color-scheme", diff --git a/docs/schema/validation.json b/docs/schema/validation.json index a309c6c4a..a153e6d16 100644 --- a/docs/schema/validation.json +++ b/docs/schema/validation.json @@ -7,6 +7,7 @@ "omitted_files": { "$ref": "#/$defs/omitted_files" }, "not_found": { "$ref": "#/$defs/not_found" }, "absolute_links": { "$ref": "#/$defs/absolute_links" }, + "unrecognized_links": { "$ref": "#/$defs/unrecognized_links" }, "nav": { "title": "validation of navigation", "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#validation",