|
1603 | 1603 | "valid": false
|
1604 | 1604 | }
|
1605 | 1605 | ]
|
| 1606 | + }, |
| 1607 | + { |
| 1608 | + "description": "propertyDependencies with unevaluatedProperties" , |
| 1609 | + "schema" : { |
| 1610 | + "$schema": "https://json-schema.org/draft/next/schema", |
| 1611 | + "properties" : {"foo2" : {}}, |
| 1612 | + "propertyDependencies": { |
| 1613 | + "foo" : {}, |
| 1614 | + "foo2": { |
| 1615 | + "bar": { |
| 1616 | + "properties": { |
| 1617 | + "buz": {} |
| 1618 | + } |
| 1619 | + } |
| 1620 | + } |
| 1621 | + }, |
| 1622 | + "unevaluatedProperties": false |
| 1623 | + }, |
| 1624 | + |
| 1625 | + "tests": [ |
| 1626 | + { |
| 1627 | + "description": "unevaluatedProperties doesn't consider propertyDependencies" , |
| 1628 | + "data": {"foo": "bar"}, |
| 1629 | + "valid": false |
| 1630 | + }, |
| 1631 | + { |
| 1632 | + "description": "unevaluatedProperties sees buz when foo2 is present", |
| 1633 | + "data": {"foo2": "bar", "buz": ""}, |
| 1634 | + "valid": true |
| 1635 | + }, |
| 1636 | + { |
| 1637 | + "description": "unevaluatedProperties doesn't see buz when foo2 is absent", |
| 1638 | + "data": {"buz": ""}, |
| 1639 | + "valid": false |
| 1640 | + } |
| 1641 | + ] |
| 1642 | + }, |
| 1643 | + { |
| 1644 | + "description": "dependentSchemas with unevaluatedProperties", |
| 1645 | + "schema": { |
| 1646 | + "$schema": "https://json-schema.org/draft/next/schema", |
| 1647 | + "properties": {"foo2": {}}, |
| 1648 | + "dependentSchemas": { |
| 1649 | + "foo" : {}, |
| 1650 | + "foo2": { |
| 1651 | + "properties": { |
| 1652 | + "bar":{} |
| 1653 | + } |
| 1654 | + } |
| 1655 | + }, |
| 1656 | + "unevaluatedProperties": false |
| 1657 | + }, |
| 1658 | + "tests": [ |
| 1659 | + { |
| 1660 | + "description": "unevaluatedProperties doesn't consider dependentSchemas", |
| 1661 | + "data": {"foo": ""}, |
| 1662 | + "valid": false |
| 1663 | + }, |
| 1664 | + { |
| 1665 | + "description": "unevaluatedProperties doesn't see bar when foo2 is absent", |
| 1666 | + "data": {"bar": ""}, |
| 1667 | + "valid": false |
| 1668 | + }, |
| 1669 | + { |
| 1670 | + "description": "unevaluatedProperties sees bar when foo2 is present", |
| 1671 | + "data": {"foo2": "", "bar": ""}, |
| 1672 | + "valid": true |
| 1673 | + } |
| 1674 | + ] |
1606 | 1675 | }
|
1607 | 1676 | ]
|
0 commit comments