We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ccede08 + 8f884ba commit e0027caCopy full SHA for e0027ca
test/test_protocol.py
@@ -85,3 +85,33 @@ def test_array_boolean(self) -> None:
85
}
86
with self.assertRaises(jsonschema.exceptions.ValidationError):
87
validate(target, SUPPORT_SCHEMA)
88
+
89
+ def test_array_enum(self) -> None:
90
+ target = {
91
+ "$schema": "http://json-schema.org/draft-07/schema#",
92
+ "type": "object",
93
+ "properties": {
94
+ "a": {
95
+ "type": "array",
96
+ "items": {
97
+ "type": "number",
98
+ "enum": [1.1, 2.2, 4.0]
99
+ }
100
+ },
101
+ "b": {
102
103
104
+ "type": "string",
105
+ "enum": ["1.1", "2.2", "4.0"]
106
107
108
+ "c": {
109
110
111
+ "type": "integer",
112
+ "enum": [1, 2, 4]
113
114
115
116
117
+ assert validate(target, SUPPORT_SCHEMA) is None
0 commit comments