Skip to content

Commit e0cb400

Browse files
committed
Add test case for wrong of.array.intems.enum validation
1 parent 8560d43 commit e0cb400

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

tests/Constraints/OfPropertiesTest.php

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,33 @@ public function getInvalidTests()
213213
}
214214
}
215215
}'
216-
)
216+
),
217+
array(
218+
'{"prop1": ["a", "b"]}',
219+
'{
220+
"type": "object",
221+
"properties": {
222+
"prop1": {
223+
"anyOf": [
224+
{
225+
"type": "array",
226+
"items": {
227+
"type": "string",
228+
"enum": ["b","c"]
229+
}
230+
},
231+
{
232+
"type": "array",
233+
"items": {
234+
"type": "string",
235+
"enum": ["c","d"]
236+
}
237+
}
238+
]
239+
}
240+
}
241+
}'
242+
),
217243
);
218244
}
219245

0 commit comments

Comments
 (0)