Skip to content

Commit fbbb01f

Browse files
remcohaszingaduh95
authored andcommitted
doc: allow the $schema property in node.config.json
The documentation states people can use the `$schema` property, but the JSON schema forbids this. This change allows it. PR-URL: #57560 Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Ulises Gascón <[email protected]> Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Pietro Marchini <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 0f38663 commit fbbb01f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

doc/node-config-schema.json

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"additionalProperties": false,
44
"properties": {
5+
"$schema": {
6+
"type": "string"
7+
},
58
"nodeOptions": {
69
"additionalProperties": false,
710
"properties": {

lib/internal/options.js

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ function generateConfigJsonSchema() {
4545
$schema: 'https://json-schema.org/draft/2020-12/schema',
4646
additionalProperties: false,
4747
properties: {
48+
$schema: {
49+
__proto__: null,
50+
type: 'string',
51+
},
4852
nodeOptions: {
4953
__proto__: null,
5054
additionalProperties: false,

0 commit comments

Comments
 (0)