From 9441a2a4afd01eb2a89e464695f6bb735a7ae340 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Wed, 15 Jul 2026 19:07:23 -0300 Subject: [PATCH 1/2] Upgrade JSON Schema CLI to v16.2.0 Signed-off-by: Juan Cruz Viotti --- Makefile | 9 ++++----- jsonschema.json | 3 ++- meta/schemas-root.json | 25 ------------------------- package-lock.json | 8 ++++---- package.json | 2 +- rules/root.json | 13 +++++++++++++ 6 files changed, 24 insertions(+), 36 deletions(-) delete mode 100644 meta/schemas-root.json create mode 100644 rules/root.json diff --git a/Makefile b/Makefile index d00081b8..39d67645 100644 --- a/Makefile +++ b/Makefile @@ -9,20 +9,19 @@ TIME ?= time include generated.mk all: common test node_modules - $(NODE) $(JSONSCHEMA) fmt schemas meta rules test + $(NODE) $(JSONSCHEMA) fmt schemas rules test .PHONY: common common: $(GENERATED) node_modules - $(TIME) $(NODE) $(JSONSCHEMA) metaschema schemas meta rules - $(TIME) $(NODE) $(JSONSCHEMA) lint schemas meta - $(TIME) $(NODE) $(JSONSCHEMA) validate meta/schemas-root.json schemas + $(TIME) $(NODE) $(JSONSCHEMA) metaschema schemas rules + $(TIME) $(NODE) $(JSONSCHEMA) lint schemas $(SHELLCHECK) scripts/*.sh ./scripts/quality-schemas-tests-mirror.sh ./scripts/quality-templates-xbrl-utr-mirror.sh .PHONY: lint lint: common node_modules - $(TIME) $(NODE) $(JSONSCHEMA) fmt schemas meta rules test --check + $(TIME) $(NODE) $(JSONSCHEMA) fmt schemas rules test --check .PHONY: test test: node_modules diff --git a/jsonschema.json b/jsonschema.json index c2c64519..748ab3d5 100644 --- a/jsonschema.json +++ b/jsonschema.json @@ -15,7 +15,8 @@ "./rules/license.json", "./rules/links.json", "./rules/single-line-text.json", - "./rules/symbol.json" + "./rules/symbol.json", + { "path": "./rules/root.json", "topLevel": true } ] } } diff --git a/meta/schemas-root.json b/meta/schemas-root.json deleted file mode 100644 index 7096546f..00000000 --- a/meta/schemas-root.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "Root schema meta-schema", - "description": "Meta-schema for validating root-level schemas", - "examples": [ - { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "Example Schema", - "description": "An example schema conforming to the root meta-schema", - "examples": [ "foo", "bar", "baz" ], - "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", - "x-links": [ "https://example.com" ], - "type": "string" - } - ], - "x-lint-exclude": "required_properties_in_properties", - "type": "object", - "required": [ "$schema", "examples", "x-license", "x-links" ], - "properties": { - "examples": { - "type": "array", - "minItems": 1 - } - } -} diff --git a/package-lock.json b/package-lock.json index a888c73f..7dfcc7c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,13 +8,13 @@ "name": "@sourcemeta/std", "version": "0.0.0", "devDependencies": { - "@sourcemeta/jsonschema": "^16.1.0" + "@sourcemeta/jsonschema": "^16.2.0" } }, "node_modules/@sourcemeta/jsonschema": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/@sourcemeta/jsonschema/-/jsonschema-16.1.0.tgz", - "integrity": "sha512-FBXyz/PxYQiPfE5bd/TFu+ZJA8I5ncG83ezCNE1J1FRN1xEYolJ83rWI88YMIZeG469uBvsE+pYL1OdNAPRrBg==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/@sourcemeta/jsonschema/-/jsonschema-16.2.0.tgz", + "integrity": "sha512-RUhiXdW+WnS8JNeU1ldYktZa7AOBQ+vYm2E+2Oi73zWf7xO6Ql5sfE8tdzq/jf9cWz2Un5ZPpUGX5pA5ofKE+g==", "cpu": [ "x64", "arm64" diff --git a/package.json b/package.json index 574f7f78..ad103355 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,6 @@ "version": "0.0.0", "private": true, "devDependencies": { - "@sourcemeta/jsonschema": "^16.1.0" + "@sourcemeta/jsonschema": "^16.2.0" } } diff --git a/rules/root.json b/rules/root.json new file mode 100644 index 00000000..ba9504c2 --- /dev/null +++ b/rules/root.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "std/root", + "description": "Root schemas must declare a dialect, at least one example, the license, and links to the corresponding standards", + "type": "object", + "required": [ "$schema", "examples", "x-license", "x-links" ], + "properties": { + "examples": { + "type": "array", + "minItems": 1 + } + } +} From fa0efd3fd5dcc36c9d8e44bcd304dcc19fb46a87 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Wed, 15 Jul 2026 19:10:45 -0300 Subject: [PATCH 2/2] Fix Signed-off-by: Juan Cruz Viotti --- rules/root.json | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/rules/root.json b/rules/root.json index ba9504c2..c64122a0 100644 --- a/rules/root.json +++ b/rules/root.json @@ -1,13 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "std/root", - "description": "Root schemas must declare a dialect, at least one example, the license, and links to the corresponding standards", + "description": "Root schemas must declare a dialect, the license, and links to the corresponding standards", "type": "object", - "required": [ "$schema", "examples", "x-license", "x-links" ], - "properties": { - "examples": { - "type": "array", - "minItems": 1 - } - } + "required": [ "$schema", "x-license", "x-links" ] }