| 1 | [ |
| 2 | { |
| 3 | "description": "property annotations are reported for list and hierarchical outputs", |
| 4 | "schema": { |
| 5 | "$schema": "https://json-schema.org/v1", |
| 6 | "$id": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0", |
| 7 | "type": "object", |
| 8 | "$defs": { |
| 9 | "integer": { |
| 10 | "type": "integer" |
| 11 | }, |
| 12 | "minimum": { |
| 13 | "minimum": 5 |
| 14 | } |
| 15 | }, |
| 16 | "properties": { |
| 17 | "passes": true, |
| 18 | "fails": false, |
| 19 | "refs": { |
| 20 | "$ref": "#/$defs/integer" |
| 21 | }, |
| 22 | "multi": { |
| 23 | "allOf": [ |
| 24 | { |
| 25 | "$ref": "#/$defs/integer" |
| 26 | }, |
| 27 | { |
| 28 | "$ref": "#/$defs/minimum" |
| 29 | } |
| 30 | ] |
| 31 | } |
| 32 | } |
| 33 | }, |
| 34 | "tests": [ |
| 35 | { |
| 36 | "description": "list output includes root annotations", |
| 37 | "data": { |
| 38 | "passes": "value" |
| 39 | }, |
| 40 | "output": { |
| 41 | "list": { |
| 42 | "$id": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0/tests/0/list", |
| 43 | "const": { |
| 44 | "valid": true, |
| 45 | "details": [ |
| 46 | { |
| 47 | "valid": true, |
| 48 | "evaluationPath": "", |
| 49 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#", |
| 50 | "instanceLocation": "" |
| 51 | }, |
| 52 | { |
| 53 | "valid": true, |
| 54 | "evaluationPath": "/properties", |
| 55 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties", |
| 56 | "instanceLocation": "", |
| 57 | "annotations": [ |
| 58 | "passes" |
| 59 | ] |
| 60 | }, |
| 61 | { |
| 62 | "valid": true, |
| 63 | "evaluationPath": "/properties/passes", |
| 64 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/passes", |
| 65 | "instanceLocation": "/passes" |
| 66 | }, |
| 67 | { |
| 68 | "valid": true, |
| 69 | "evaluationPath": "/type", |
| 70 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/type", |
| 71 | "instanceLocation": "" |
| 72 | } |
| 73 | ] |
| 74 | } |
| 75 | }, |
| 76 | "hierarchical": { |
| 77 | "$id": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0/tests/0/hierarchical", |
| 78 | "const": { |
| 79 | "valid": true, |
| 80 | "evaluationPath": "", |
| 81 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#", |
| 82 | "instanceLocation": "", |
| 83 | "details": [ |
| 84 | { |
| 85 | "valid": true, |
| 86 | "evaluationPath": "/properties", |
| 87 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties", |
| 88 | "instanceLocation": "", |
| 89 | "annotations": [ |
| 90 | "passes" |
| 91 | ], |
| 92 | "details": [ |
| 93 | { |
| 94 | "valid": true, |
| 95 | "evaluationPath": "/properties/passes", |
| 96 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/passes", |
| 97 | "instanceLocation": "/passes" |
| 98 | } |
| 99 | ] |
| 100 | }, |
| 101 | { |
| 102 | "valid": true, |
| 103 | "evaluationPath": "/type", |
| 104 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/type", |
| 105 | "instanceLocation": "" |
| 106 | } |
| 107 | ] |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | }, |
| 112 | { |
| 113 | "description": "false property is reported as error", |
| 114 | "data": { |
| 115 | "fails": "value" |
| 116 | }, |
| 117 | "output": { |
| 118 | "list": { |
| 119 | "$id": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0/tests/1/list", |
| 120 | "const": { |
| 121 | "valid": false, |
| 122 | "details": [ |
| 123 | { |
| 124 | "valid": false, |
| 125 | "evaluationPath": "", |
| 126 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#", |
| 127 | "instanceLocation": "" |
| 128 | }, |
| 129 | { |
| 130 | "valid": false, |
| 131 | "evaluationPath": "/properties", |
| 132 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties", |
| 133 | "instanceLocation": "", |
| 134 | "droppedAnnotations": [ |
| 135 | "fails" |
| 136 | ] |
| 137 | }, |
| 138 | { |
| 139 | "valid": false, |
| 140 | "evaluationPath": "/properties/fails", |
| 141 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/fails", |
| 142 | "instanceLocation": "/fails", |
| 143 | "errors": { |
| 144 | "falseSchema": "False schema does not allow \"value\"" |
| 145 | } |
| 146 | }, |
| 147 | { |
| 148 | "valid": true, |
| 149 | "evaluationPath": "/type", |
| 150 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/type", |
| 151 | "instanceLocation": "" |
| 152 | } |
| 153 | ] |
| 154 | } |
| 155 | }, |
| 156 | "hierarchical": { |
| 157 | "$id": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0/tests/1/hierarchical", |
| 158 | "const": { |
| 159 | "valid": false, |
| 160 | "evaluationPath": "", |
| 161 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#", |
| 162 | "instanceLocation": "", |
| 163 | "details": [ |
| 164 | { |
| 165 | "valid": false, |
| 166 | "evaluationPath": "/properties", |
| 167 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties", |
| 168 | "instanceLocation": "", |
| 169 | "droppedAnnotations": [ |
| 170 | "fails" |
| 171 | ], |
| 172 | "details": [ |
| 173 | { |
| 174 | "valid": false, |
| 175 | "evaluationPath": "/properties/fails", |
| 176 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/fails", |
| 177 | "instanceLocation": "/fails", |
| 178 | "errors": { |
| 179 | "falseSchema": "False schema does not allow \"value\"" |
| 180 | } |
| 181 | } |
| 182 | ] |
| 183 | }, |
| 184 | { |
| 185 | "valid": true, |
| 186 | "evaluationPath": "/type", |
| 187 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/type", |
| 188 | "instanceLocation": "" |
| 189 | } |
| 190 | ] |
| 191 | } |
| 192 | } |
| 193 | } |
| 194 | }, |
| 195 | { |
| 196 | "description": "allOf failure exposes nested evaluation paths", |
| 197 | "data": { |
| 198 | "multi": 3.5 |
| 199 | }, |
| 200 | "output": { |
| 201 | "list": { |
| 202 | "$id": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0/tests/2/list", |
| 203 | "const": { |
| 204 | "valid": false, |
| 205 | "details": [ |
| 206 | { |
| 207 | "valid": false, |
| 208 | "evaluationPath": "", |
| 209 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#", |
| 210 | "instanceLocation": "" |
| 211 | }, |
| 212 | { |
| 213 | "valid": false, |
| 214 | "evaluationPath": "/properties", |
| 215 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties", |
| 216 | "instanceLocation": "", |
| 217 | "droppedAnnotations": [ |
| 218 | "multi" |
| 219 | ] |
| 220 | }, |
| 221 | { |
| 222 | "valid": false, |
| 223 | "evaluationPath": "/properties/multi", |
| 224 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi", |
| 225 | "instanceLocation": "/multi" |
| 226 | }, |
| 227 | { |
| 228 | "valid": false, |
| 229 | "evaluationPath": "/properties/multi/allOf", |
| 230 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi/allOf", |
| 231 | "instanceLocation": "/multi" |
| 232 | }, |
| 233 | { |
| 234 | "valid": false, |
| 235 | "evaluationPath": "/properties/multi/allOf/0", |
| 236 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi/allOf/0", |
| 237 | "instanceLocation": "/multi" |
| 238 | }, |
| 239 | { |
| 240 | "valid": false, |
| 241 | "evaluationPath": "/properties/multi/allOf/0/$ref", |
| 242 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi/allOf/0/$ref", |
| 243 | "instanceLocation": "/multi" |
| 244 | }, |
| 245 | { |
| 246 | "valid": false, |
| 247 | "evaluationPath": "/properties/multi/allOf/0/$ref/type", |
| 248 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi/allOf/0/$ref/type", |
| 249 | "instanceLocation": "/multi", |
| 250 | "errors": { |
| 251 | "type": "3.5 is not of type \"integer\"" |
| 252 | } |
| 253 | }, |
| 254 | { |
| 255 | "valid": false, |
| 256 | "evaluationPath": "/properties/multi/allOf/1", |
| 257 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi/allOf/1", |
| 258 | "instanceLocation": "/multi" |
| 259 | }, |
| 260 | { |
| 261 | "valid": false, |
| 262 | "evaluationPath": "/properties/multi/allOf/1/$ref", |
| 263 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi/allOf/1/$ref", |
| 264 | "instanceLocation": "/multi" |
| 265 | }, |
| 266 | { |
| 267 | "valid": false, |
| 268 | "evaluationPath": "/properties/multi/allOf/1/$ref/minimum", |
| 269 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi/allOf/1/$ref/minimum", |
| 270 | "instanceLocation": "/multi", |
| 271 | "errors": { |
| 272 | "minimum": "3.5 is less than the minimum of 5" |
| 273 | } |
| 274 | }, |
| 275 | { |
| 276 | "valid": true, |
| 277 | "evaluationPath": "/type", |
| 278 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/type", |
| 279 | "instanceLocation": "" |
| 280 | } |
| 281 | ] |
| 282 | } |
| 283 | }, |
| 284 | "hierarchical": { |
| 285 | "$id": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0/tests/2/hierarchical", |
| 286 | "const": { |
| 287 | "valid": false, |
| 288 | "evaluationPath": "", |
| 289 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#", |
| 290 | "instanceLocation": "", |
| 291 | "details": [ |
| 292 | { |
| 293 | "valid": false, |
| 294 | "evaluationPath": "/properties", |
| 295 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties", |
| 296 | "instanceLocation": "", |
| 297 | "droppedAnnotations": [ |
| 298 | "multi" |
| 299 | ], |
| 300 | "details": [ |
| 301 | { |
| 302 | "valid": false, |
| 303 | "evaluationPath": "/properties/multi", |
| 304 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi", |
| 305 | "instanceLocation": "/multi", |
| 306 | "details": [ |
| 307 | { |
| 308 | "valid": false, |
| 309 | "evaluationPath": "/properties/multi/allOf", |
| 310 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi/allOf", |
| 311 | "instanceLocation": "/multi", |
| 312 | "details": [ |
| 313 | { |
| 314 | "valid": false, |
| 315 | "evaluationPath": "/properties/multi/allOf/0", |
| 316 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi/allOf/0", |
| 317 | "instanceLocation": "/multi", |
| 318 | "details": [ |
| 319 | { |
| 320 | "valid": false, |
| 321 | "evaluationPath": "/properties/multi/allOf/0/$ref", |
| 322 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi/allOf/0/$ref", |
| 323 | "instanceLocation": "/multi", |
| 324 | "details": [ |
| 325 | { |
| 326 | "valid": false, |
| 327 | "evaluationPath": "/properties/multi/allOf/0/$ref/type", |
| 328 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi/allOf/0/$ref/type", |
| 329 | "instanceLocation": "/multi", |
| 330 | "errors": { |
| 331 | "type": "3.5 is not of type \"integer\"" |
| 332 | } |
| 333 | } |
| 334 | ] |
| 335 | } |
| 336 | ] |
| 337 | }, |
| 338 | { |
| 339 | "valid": false, |
| 340 | "evaluationPath": "/properties/multi/allOf/1", |
| 341 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi/allOf/1", |
| 342 | "instanceLocation": "/multi", |
| 343 | "details": [ |
| 344 | { |
| 345 | "valid": false, |
| 346 | "evaluationPath": "/properties/multi/allOf/1/$ref", |
| 347 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi/allOf/1/$ref", |
| 348 | "instanceLocation": "/multi", |
| 349 | "details": [ |
| 350 | { |
| 351 | "valid": false, |
| 352 | "evaluationPath": "/properties/multi/allOf/1/$ref/minimum", |
| 353 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/properties/multi/allOf/1/$ref/minimum", |
| 354 | "instanceLocation": "/multi", |
| 355 | "errors": { |
| 356 | "minimum": "3.5 is less than the minimum of 5" |
| 357 | } |
| 358 | } |
| 359 | ] |
| 360 | } |
| 361 | ] |
| 362 | } |
| 363 | ] |
| 364 | } |
| 365 | ] |
| 366 | } |
| 367 | ] |
| 368 | }, |
| 369 | { |
| 370 | "valid": true, |
| 371 | "evaluationPath": "/type", |
| 372 | "schemaLocation": "https://json-schema.org/tests/content/v1-extra/list-hierarchical/0#/type", |
| 373 | "instanceLocation": "" |
| 374 | } |
| 375 | ] |
| 376 | } |
| 377 | } |
| 378 | } |
| 379 | } |
| 380 | ] |
| 381 | } |
| 382 | ] |