|
273 | 273 | "tests": [
|
274 | 274 | {
|
275 | 275 | "description": "valid tree",
|
276 |
| - "data": { |
| 276 | + "data": { |
277 | 277 | "meta": "root",
|
278 | 278 | "nodes": [
|
279 | 279 | {
|
|
302 | 302 | },
|
303 | 303 | {
|
304 | 304 | "description": "invalid tree",
|
305 |
| - "data": { |
| 305 | + "data": { |
306 | 306 | "meta": "root",
|
307 | 307 | "nodes": [
|
308 | 308 | {
|
|
358 | 358 | }
|
359 | 359 | ]
|
360 | 360 | },
|
| 361 | + { |
| 362 | + "description": "Invalid use of fragments in location-independent $id", |
| 363 | + "schema": {"$ref": "https://json-schema.org/draft/2019-09/schema"}, |
| 364 | + "tests": [ |
| 365 | + { |
| 366 | + "description": "Identifier name", |
| 367 | + "data": { |
| 368 | + "$ref": "#foo", |
| 369 | + "$defs": { |
| 370 | + "A": { |
| 371 | + "$id": "#foo", |
| 372 | + "type": "integer" |
| 373 | + } |
| 374 | + } |
| 375 | + }, |
| 376 | + "valid": false |
| 377 | + }, |
| 378 | + { |
| 379 | + "description": "Identifier path", |
| 380 | + "data": { |
| 381 | + "$ref": "#/a/b", |
| 382 | + "$defs": { |
| 383 | + "A": { |
| 384 | + "$id": "#/a/b", |
| 385 | + "type": "integer" |
| 386 | + } |
| 387 | + } |
| 388 | + }, |
| 389 | + "valid": false |
| 390 | + }, |
| 391 | + { |
| 392 | + "description": "Identifier name with absolute URI", |
| 393 | + "data": { |
| 394 | + "$ref": "http://localhost:1234/bar#foo", |
| 395 | + "$defs": { |
| 396 | + "A": { |
| 397 | + "$id": "http://localhost:1234/bar#foo", |
| 398 | + "type": "integer" |
| 399 | + } |
| 400 | + } |
| 401 | + }, |
| 402 | + "valid": false |
| 403 | + }, |
| 404 | + { |
| 405 | + "description": "Identifier path with absolute URI", |
| 406 | + "data": { |
| 407 | + "$ref": "http://localhost:1234/bar#/a/b", |
| 408 | + "$defs": { |
| 409 | + "A": { |
| 410 | + "$id": "http://localhost:1234/bar#/a/b", |
| 411 | + "type": "integer" |
| 412 | + } |
| 413 | + } |
| 414 | + }, |
| 415 | + "valid": false |
| 416 | + }, |
| 417 | + { |
| 418 | + "description": "Identifier name with base URI change in subschema", |
| 419 | + "data": { |
| 420 | + "$id": "http://localhost:1234/root", |
| 421 | + "$ref": "http://localhost:1234/nested.json#foo", |
| 422 | + "$defs": { |
| 423 | + "A": { |
| 424 | + "$id": "nested.json", |
| 425 | + "$defs": { |
| 426 | + "B": { |
| 427 | + "$id": "#foo", |
| 428 | + "type": "integer" |
| 429 | + } |
| 430 | + } |
| 431 | + } |
| 432 | + } |
| 433 | + }, |
| 434 | + "valid": false |
| 435 | + }, |
| 436 | + { |
| 437 | + "description": "Identifier path with base URI change in subschema", |
| 438 | + "data": { |
| 439 | + "$id": "http://localhost:1234/root", |
| 440 | + "$ref": "http://localhost:1234/nested.json#/a/b", |
| 441 | + "$defs": { |
| 442 | + "A": { |
| 443 | + "$id": "nested.json", |
| 444 | + "$defs": { |
| 445 | + "B": { |
| 446 | + "$id": "#/a/b", |
| 447 | + "type": "integer" |
| 448 | + } |
| 449 | + } |
| 450 | + } |
| 451 | + } |
| 452 | + }, |
| 453 | + "valid": false |
| 454 | + } |
| 455 | + ] |
| 456 | + }, |
361 | 457 | {
|
362 | 458 | "description": "ref creates new scope when adjacent to keywords",
|
363 | 459 | "schema": {
|
|
0 commit comments