4 "patternProperties validates properties matching a regex",
7 "f.*o": {"type": "integer"}
12 "description": "a single valid match is valid",
17 "description": "multiple valid matches is valid",
18 "data": {"foo": 1, "foooooo" : 2},
22 "description": "a single invalid match is invalid",
23 "data": {"foo": "bar", "fooooo": 2},
27 "description": "multiple invalid matches is invalid",
28 "data": {"foo": "bar", "foooooo" : "baz"},
32 "description": "ignores non-objects",
39 "description": "multiple simultaneous patternProperties are validated",
41 "patternProperties": {
42 "a*": {"type": "integer"},
43 "aaa*": {"maximum": 20}
48 "description": "a single valid match is valid",
53 "description": "a simultaneous match is valid",
58 "description": "multiple matches is valid",
59 "data": {"a": 21, "aaaa": 18},
63 "description": "an invalid due to one is invalid",
68 "description": "an invalid due to the other is invalid",
73 "description": "an invalid due to both is invalid",
74 "data": {"aaa": "foo", "aaaa": 31},
80 "description": "regexes are not anchored by default and are case sensitive",
82 "patternProperties": {
83 "[0-9]{2,}": { "type": "boolean" },
84 "X_": { "type": "string" }
89 "description": "non recognized members are ignored",
90 "data": { "answer 1": "42" },
94 "description": "recognized members are accounted for",
95 "data": { "a31b": null },
99 "description": "regexes are case sensitive",
100 "data": { "a_x_3": 3 },
104 "description": "regexes are case sensitive, 2",
105 "data": { "a_X_3": 3 },