|
1 | 1 | {
|
2 | 2 | "$schema": "http://json-schema.org/draft-08/schema#",
|
3 | 3 | "$id": "http://json-schema.org/draft-08/schema#",
|
| 4 | + "$recursiveAnchor": true, |
| 5 | + |
4 | 6 | "title": "Core schema meta-schema",
|
5 | 7 | "$defs": {
|
6 | 8 | "schemaArray": {
|
7 | 9 | "type": "array",
|
8 | 10 | "minItems": 1,
|
9 |
| - "items": { "$ref": "#" } |
| 11 | + "items": { "$recursiveRef": "#" } |
10 | 12 | },
|
11 | 13 | "nonNegativeInteger": {
|
12 | 14 | "type": "integer",
|
|
55 | 57 | },
|
56 | 58 | "$defs": {
|
57 | 59 | "type": "object",
|
58 |
| - "additionalProperties": { "$ref": "#" }, |
| 60 | + "additionalProperties": { "$recursiveRef": "#" }, |
59 | 61 | "default": {}
|
60 | 62 | },
|
61 | 63 | "definitions": {
|
62 | 64 | "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",
|
63 | 65 | "type": "object",
|
64 |
| - "additionalProperties": { "$ref": "#" }, |
| 66 | + "additionalProperties": { "$recursiveRef": "#" }, |
65 | 67 | "default": {}
|
66 | 68 | },
|
67 | 69 | "title": {
|
|
101 | 103 | "type": "string",
|
102 | 104 | "format": "regex"
|
103 | 105 | },
|
104 |
| - "additionalItems": { "$ref": "#" }, |
| 106 | + "additionalItems": { "$recursiveRef": "#" }, |
105 | 107 | "items": {
|
106 | 108 | "anyOf": [
|
107 |
| - { "$ref": "#" }, |
| 109 | + { "$recursiveRef": "#" }, |
108 | 110 | { "$ref": "#/$defs/schemaArray" }
|
109 |
| - ] |
| 111 | + ], |
| 112 | + "default": true |
110 | 113 | },
|
111 | 114 | "maxItems": { "$ref": "#/$defs/nonNegativeInteger" },
|
112 | 115 | "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
|
113 | 116 | "uniqueItems": {
|
114 | 117 | "type": "boolean",
|
115 | 118 | "default": false
|
116 | 119 | },
|
117 |
| - "contains": { "$ref": "#" }, |
| 120 | + "contains": { "$recursiveRef": "#" }, |
118 | 121 | "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" },
|
119 | 122 | "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
|
120 | 123 | "required": { "$ref": "#/$defs/stringArray" },
|
121 |
| - "additionalProperties": { "$ref": "#" }, |
| 124 | + "additionalProperties": { "$recursiveRef": "#" }, |
122 | 125 | "properties": {
|
123 | 126 | "type": "object",
|
124 |
| - "additionalProperties": { "$ref": "#" }, |
| 127 | + "additionalProperties": { "$recursiveRef": "#" }, |
125 | 128 | "default": {}
|
126 | 129 | },
|
127 | 130 | "patternProperties": {
|
128 | 131 | "type": "object",
|
129 |
| - "additionalProperties": { "$ref": "#" }, |
| 132 | + "additionalProperties": { "$recursiveRef": "#" }, |
130 | 133 | "propertyNames": { "format": "regex" },
|
131 | 134 | "default": {}
|
132 | 135 | },
|
133 |
| - "dependentSchemas": { |
| 136 | + "dependencies": { |
134 | 137 | "type": "object",
|
135 | 138 | "additionalProperties": {
|
136 |
| - "$ref": "#" |
| 139 | + "$recursiveRef": "#" |
137 | 140 | }
|
138 | 141 | },
|
139 |
| - "dependentRequired": { |
| 142 | + "requiredDependencies": { |
140 | 143 | "type": "object",
|
141 | 144 | "additionalProperties": {
|
142 | 145 | "$ref": "#/$defs/stringArray"
|
143 | 146 | }
|
144 | 147 | },
|
145 |
| - "dependencies": { |
146 |
| - "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"", |
147 |
| - "type": "object", |
148 |
| - "additionalProperties": { |
149 |
| - "anyOf": [ |
150 |
| - { "$ref": "#" }, |
151 |
| - { "$ref": "#/$defs/stringArray" } |
152 |
| - ] |
153 |
| - } |
| 148 | + "propertyNames": { |
| 149 | + "additionalProperties": { "$recursiveRef": "#" } |
154 | 150 | },
|
155 |
| - "propertyNames": { "$ref": "#" }, |
156 | 151 | "const": true,
|
157 | 152 | "enum": {
|
158 | 153 | "type": "array",
|
|
174 | 169 | "format": { "type": "string" },
|
175 | 170 | "contentMediaType": { "type": "string" },
|
176 | 171 | "contentEncoding": { "type": "string" },
|
177 |
| - "if": { "$ref": "#" }, |
178 |
| - "then": { "$ref": "#" }, |
179 |
| - "else": { "$ref": "#" }, |
| 172 | + "if": { "$recursiveRef": "#" }, |
| 173 | + "then": { "$recursiveRef": "#" }, |
| 174 | + "else": { "$recursiveRef": "#" }, |
180 | 175 | "allOf": { "$ref": "#/$defs/schemaArray" },
|
181 | 176 | "anyOf": { "$ref": "#/$defs/schemaArray" },
|
182 | 177 | "oneOf": { "$ref": "#/$defs/schemaArray" },
|
183 |
| - "not": { "$ref": "#" } |
184 |
| - } |
| 178 | + "not": { "$recursiveRef": "#" } |
| 179 | + }, |
| 180 | + "default": true |
185 | 181 | }
|
0 commit comments