You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{<instance-pass `An instance with all the required properties is valid`>}}
40
-
{ "foo": "bar" }
47
+
{{<instance-pass `An object value that defines the required properties to any values is valid`>}}
48
+
{ "foo": 1, "bar": 2, "baz": 3 }
41
49
{{</instance-pass>}}
42
50
43
-
{{<instance-fail `An instance with missing required properties is invalid`>}}
44
-
{ "bar": false }
51
+
{{<instance-pass `An object value that defines a superset of the required properties is valid`>}}
52
+
{ "foo": 1, "bar": 2, "baz": 3, "extra": true }
53
+
{{</instance-pass>}}
54
+
55
+
{{<instance-fail `An object value that only defines a subset of the required properties is invalid`>}}
56
+
{ "foo": 1, "bar": 2, "extra": true }
45
57
{{</instance-fail>}}
46
58
47
-
{{<instance-pass `An instance with all the required properties is valid`>}}
48
-
{ "foo": [ "bar" ], "baz": 13 }
59
+
{{<instance-fail `An empty object is invalid`>}}
60
+
{}
61
+
{{</instance-fail>}}
62
+
63
+
{{<instance-pass `A non-object value is valid`>}}
64
+
"Hello World"
49
65
{{</instance-pass>}}
50
-
*_It is important to note that when the required properties are not defined in the `properties`, then the only requirement to make the instance valid is to have those properties present in the instance irrespective of their value's datatype._
51
66
52
-
{{<schema `Schema with the 'required' keyword`>}}
67
+
{{<schema `A schema that constrains object instances to define certain properties and to describe their value`>}}
0 commit comments