Skip to content

Commit 6b3cac4

Browse files
authored
Merge pull request #624 from json-schema-org/gregsdennis/propertyDependencies-fixups
fixed propertyDependencies `$schema` & `$id`; removed invalid test cases
2 parents a390e32 + ef6fb99 commit 6b3cac4

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

tests/draft-next/dynamicRef.json

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -488,13 +488,18 @@
488488
{
489489
"description": "$dynamicAnchor inside propertyDependencies",
490490
"schema": {
491-
"$schema": "https://json-schema.org/draft/2020-12/schema",
492-
"$id": "http://localhost:1234/draft2020-12/dynamicanchor-in-propertydependencies.json",
491+
"$schema": "https://json-schema.org/draft/next/schema",
492+
"$id": "http://localhost:1234/draft-next/dynamicanchor-in-propertydependencies.json",
493493
"$defs": {
494494
"inner": {
495495
"$id": "inner",
496496
"$dynamicAnchor": "foo",
497497
"type": "object",
498+
"properties": {
499+
"expectedTypes": {
500+
"type": "string"
501+
}
502+
},
498503
"additionalProperties": {
499504
"$dynamicRef": "#foo"
500505
}
@@ -557,20 +562,6 @@
557562
"anotherProperty": "a string"
558563
},
559564
"valid": false
560-
},
561-
{
562-
"description": "expected missing - additional property as an object is valid",
563-
"data": {
564-
"anotherProperty": {}
565-
},
566-
"valid": true
567-
},
568-
{
569-
"description": "expected missing - additional property as not object is invalid",
570-
"data": {
571-
"anotherProperty": 42
572-
},
573-
"valid": false
574565
}
575566
]
576567
}

tests/draft-next/unevaluatedProperties.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,11 @@
14751475
"description": "unevaluatedProperties can see inside propertyDependencies",
14761476
"schema": {
14771477
"$schema": "https://json-schema.org/draft/next/schema",
1478+
"properties": {
1479+
"foo": {
1480+
"type": "string"
1481+
}
1482+
},
14781483
"propertyDependencies": {
14791484
"foo": {
14801485
"foo1": {

0 commit comments

Comments
 (0)