From 96c7b8123e5f0e75911456630c70f5701cda4de6 Mon Sep 17 00:00:00 2001 From: Nikita Skovoroda Date: Sat, 31 Jan 2026 01:40:08 +0400 Subject: [PATCH 1/2] doc: fix node-config-schema --- doc/node-config-schema.json | 189 ++++++++++++++++++------------------ 1 file changed, 97 insertions(+), 92 deletions(-) diff --git a/doc/node-config-schema.json b/doc/node-config-schema.json index 22f52952af54d4..ad1c4440108286 100644 --- a/doc/node-config-schema.json +++ b/doc/node-config-schema.json @@ -1,12 +1,14 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, + "required": [], "properties": { "$schema": { "type": "string" }, "nodeOptions": { "additionalProperties": false, + "required": [], "properties": { "addons": { "type": "boolean" @@ -23,11 +25,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -37,11 +39,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -66,11 +68,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -107,11 +109,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -151,11 +153,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -237,11 +239,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -341,11 +343,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -373,11 +375,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -390,11 +392,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -413,11 +415,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -430,11 +432,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -444,11 +446,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -464,11 +466,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -586,11 +588,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -606,6 +608,7 @@ "permission": { "type": "object", "additionalProperties": false, + "required": [], "properties": { "allow-addons": { "type": "boolean" @@ -619,11 +622,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -633,11 +636,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -661,6 +664,7 @@ "test": { "type": "object", "additionalProperties": false, + "required": [], "properties": { "experimental-test-coverage": { "type": "boolean" @@ -683,11 +687,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -700,11 +704,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -726,11 +730,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -743,11 +747,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -757,11 +761,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -777,11 +781,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, @@ -796,6 +800,7 @@ "watch": { "type": "object", "additionalProperties": false, + "required": [], "properties": { "watch": { "type": "boolean" @@ -809,11 +814,11 @@ "type": "string" }, { + "type": "array", + "minItems": 1, "items": { - "type": "string", - "minItems": 1 - }, - "type": "array" + "type": "string" + } } ] }, From 40bfdac41861c60d07eb6fb37bf27326bd4eb2ef Mon Sep 17 00:00:00 2001 From: Nikita Skovoroda Date: Sat, 31 Jan 2026 02:32:26 +0400 Subject: [PATCH 2/2] doc: fix schema generator --- lib/internal/options.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/internal/options.js b/lib/internal/options.js index be1dc6a842c526..dbf9bf9bfcbd75 100644 --- a/lib/internal/options.js +++ b/lib/internal/options.js @@ -54,7 +54,7 @@ function generateConfigJsonSchema() { __proto__: null, oneOf: [ { __proto__: null, type: 'string' }, - { __proto__: null, items: { __proto__: null, type: 'string', minItems: 1 }, type: 'array' }, + { __proto__: null, type: 'array', minItems: 1, items: { __proto__: null, type: 'string' } }, ], }; } @@ -66,6 +66,7 @@ function generateConfigJsonSchema() { __proto__: null, $schema: 'https://json-schema.org/draft/2020-12/schema', additionalProperties: false, + required: [], properties: { $schema: { __proto__: null, @@ -74,6 +75,7 @@ function generateConfigJsonSchema() { nodeOptions: { __proto__: null, additionalProperties: false, + required: [], properties: { __proto__: null }, type: 'object', }, @@ -99,6 +101,7 @@ function generateConfigJsonSchema() { __proto__: null, type: 'object', additionalProperties: false, + required: [], properties: { __proto__: null }, };