Skip to content

Commit 2c497cf

Browse files
committed
desc update & not nested test added
1 parent 4cbf3f0 commit 2c497cf

1 file changed

Lines changed: 38 additions & 1 deletion

File tree

src/test-suite/tests/not.json

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
]
5353
},
5454
{
55-
"description": "not with nested schema producing a match",
55+
"description": "not fails due to subschema match with success explanation",
5656
"schema": {
5757
"not": {
5858
"required": ["a"]
@@ -76,6 +76,43 @@
7676
]
7777
}
7878
]
79+
},
80+
{
81+
"description": "not with nested schema producing a match",
82+
"schema": {
83+
"not": {
84+
"oneOf":[
85+
{ "required": ["a"] },
86+
{ "required": ["b"] }
87+
]
88+
}
89+
},
90+
"instance": { "a": 1, "b": 2 },
91+
"errors": [
92+
{
93+
"messageId": "not-message",
94+
"instanceLocation": "#",
95+
"schemaLocations": ["#/not"],
96+
"alternatives": [
97+
[
98+
{
99+
"messageId": "required-success",
100+
"messageParams": { "property": "a" },
101+
"instanceLocation": "#",
102+
"schemaLocations": ["#/not/oneOf/0/required"]
103+
}
104+
],
105+
[
106+
{
107+
"messageId": "required-success",
108+
"messageParams": { "property": "b" },
109+
"instanceLocation": "#",
110+
"schemaLocations": ["#/not/oneOf/1/required"]
111+
}
112+
]
113+
]
114+
}
115+
]
79116
}
80117
]
81118
}

0 commit comments

Comments
 (0)