|
3 | 3 | "id": "http://json-schema.org/draft/schema#",
|
4 | 4 | "title": "Core schema meta-schema",
|
5 | 5 | "definitions": {
|
| 6 | + "jsonReference": { |
| 7 | + "type": "object", |
| 8 | + "properties": { |
| 9 | + "$ref": { |
| 10 | + "type": "string", |
| 11 | + "format": "uriref" |
| 12 | + } |
| 13 | + }, |
| 14 | + "required": [ "$ref" ] |
| 15 | + }, |
| 16 | + "notJsonReference": { |
| 17 | + "not": { |
| 18 | + "required": [ "$ref" ] |
| 19 | + } |
| 20 | + }, |
6 | 21 | "schemaArray": {
|
7 | 22 | "type": "array",
|
8 | 23 | "minItems": 1,
|
9 |
| - "items": { "$ref": "#" } |
| 24 | + "items": { "$ref": "#/definitions/subSchema" } |
10 | 25 | },
|
11 | 26 | "positiveInteger": {
|
12 | 27 | "type": "integer",
|
|
33 | 48 | "type": "array",
|
34 | 49 | "items": { "type": "string" },
|
35 | 50 | "uniqueItems": true
|
| 51 | + }, |
| 52 | + "subSchema": { |
| 53 | + "oneOf": [ |
| 54 | + { |
| 55 | + "allOf": [ |
| 56 | + { "$ref": "#" }, |
| 57 | + { "$ref": "#/definitions/notJsonReference" } |
| 58 | + ] |
| 59 | + }, |
| 60 | + { "$ref": "#/definitions/jsonReference" } |
| 61 | + ] |
36 | 62 | }
|
37 | 63 | },
|
38 | 64 | "type": ["object", "boolean"],
|
|
77 | 103 | "type": "string",
|
78 | 104 | "format": "regex"
|
79 | 105 | },
|
80 |
| - "additionalItems": { "$ref": "#" }, |
| 106 | + "additionalItems": { "$ref": "#/definitions/subSchema" }, |
81 | 107 | "items": {
|
82 | 108 | "anyOf": [
|
83 |
| - { "$ref": "#" }, |
| 109 | + { "$ref": "#/definitions/subSchema" }, |
84 | 110 | { "$ref": "#/definitions/schemaArray" }
|
85 | 111 | ],
|
86 | 112 | "default": {}
|
|
95 | 121 | "maxProperties": { "$ref": "#/definitions/positiveInteger" },
|
96 | 122 | "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
|
97 | 123 | "required": { "$ref": "#/definitions/stringArray" },
|
98 |
| - "additionalProperties": { "$ref": "#" }, |
| 124 | + "additionalProperties": { "$ref": "#/definitions/subSchema" }, |
99 | 125 | "definitions": {
|
100 | 126 | "type": "object",
|
101 |
| - "additionalProperties": { "$ref": "#" }, |
| 127 | + "additionalProperties": { "$ref": "#/definitions/subSchema" }, |
102 | 128 | "default": {}
|
103 | 129 | },
|
104 | 130 | "properties": {
|
105 | 131 | "type": "object",
|
106 |
| - "additionalProperties": { "$ref": "#" }, |
| 132 | + "additionalProperties": { "$ref": "#/definitions/subSchema" }, |
107 | 133 | "default": {}
|
108 | 134 | },
|
109 | 135 | "patternProperties": {
|
110 | 136 | "type": "object",
|
111 |
| - "additionalProperties": { "$ref": "#" }, |
| 137 | + "additionalProperties": { "$ref": "#/definitions/subSchema" }, |
112 | 138 | "default": {}
|
113 | 139 | },
|
114 | 140 | "dependencies": {
|
115 | 141 | "type": "object",
|
116 | 142 | "additionalProperties": {
|
117 | 143 | "anyOf": [
|
118 |
| - { "$ref": "#" }, |
| 144 | + { "$ref": "#/definitions/subSchema" }, |
119 | 145 | { "$ref": "#/definitions/stringArray" }
|
120 | 146 | ]
|
121 | 147 | }
|
|
142 | 168 | "allOf": { "$ref": "#/definitions/schemaArray" },
|
143 | 169 | "anyOf": { "$ref": "#/definitions/schemaArray" },
|
144 | 170 | "oneOf": { "$ref": "#/definitions/schemaArray" },
|
145 |
| - "not": { "$ref": "#" } |
| 171 | + "not": { "$ref": "#/definitions/subSchema" } |
146 | 172 | },
|
147 | 173 | "dependencies": {
|
148 | 174 | "exclusiveMaximum": [ "maximum" ],
|
|
0 commit comments