Skip to content

Commit 0e08f03

Browse files
karenetheridgeRelequestual
authored andcommitted
Add or remove defaults as appropriate including where redundant (#1006)
- Remove `default` from all subschemas that recursively-reference #meta - Add `default to `dependencies` Remove, e.g. when evaluating the "not" keyword, the subschema inside it should *not* be true, as that would produce a false result from this keyword.
1 parent 77686de commit 0e08f03

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

meta/applicator.json

+2-8
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
"prefixItems": { "$ref": "#/$defs/schemaArray" },
1313
"items": { "$dynamicRef": "#meta" },
1414
"contains": { "$dynamicRef": "#meta" },
15-
"additionalProperties": {
16-
"$dynamicRef": "#meta",
17-
"default": {}
18-
},
15+
"additionalProperties": { "$dynamicRef": "#meta" },
1916
"properties": {
2017
"type": "object",
2118
"additionalProperties": { "$dynamicRef": "#meta" },
@@ -32,10 +29,7 @@
3229
"additionalProperties": { "$dynamicRef": "#meta" },
3330
"default": {}
3431
},
35-
"propertyNames": {
36-
"$dynamicRef": "#meta",
37-
"default": {}
38-
},
32+
"propertyNames": { "$dynamicRef": "#meta" },
3933
"if": { "$dynamicRef": "#meta" },
4034
"then": { "$dynamicRef": "#meta" },
4135
"else": { "$dynamicRef": "#meta" },

meta/core.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
},
3232
"$defs": {
3333
"type": "object",
34-
"additionalProperties": { "$dynamicRef": "#meta" },
35-
"default": {}
34+
"additionalProperties": { "$dynamicRef": "#meta" }
3635
}
3736
},
3837
"$defs": {

schema.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"$comment": "\"definitions\" has been replaced by \"$defs\".",
3030
"type": "object",
3131
"additionalProperties": { "$dynamicRef": "#meta" },
32-
"default": {},
33-
"deprecated": true
32+
"deprecated": true,
33+
"default": {}
3434
},
3535
"dependencies": {
3636
"$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.",
@@ -41,7 +41,8 @@
4141
{ "$ref": "meta/validation#/$defs/stringArray" }
4242
]
4343
},
44-
"deprecated": true
44+
"deprecated": true,
45+
"default": {}
4546
},
4647
"$recursiveAnchor": {
4748
"$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".",

0 commit comments

Comments
 (0)