build_regex_from_schema()
: Incorrect behavior for oneOf
and allOf
#906
Labels
build_regex_from_schema()
: Incorrect behavior for oneOf
and allOf
#906
Describe the issue as clearly as possible:
Pattern repetition cannot be used when one repetition is dependent on another repetition in and array or object
For example, when handling an array in
json_schema.py
we useRepetition works with
anyOf
because the types of items are independent. This is not true forallOf
oroneOf
.oneOf
andallOf
require knowledge of the types of other items in order to produce a valid item.For example, if we want
oneOf("string", "number")
with length 2, we cannot use(STRING|NUMBER){2}
, we must useSTRING{2}|NUMBER{2}
The text was updated successfully, but these errors were encountered: