Skip to content

Commit 87673c8

Browse files
committed
cover another error case
1 parent d915267 commit 87673c8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

end_to_end_tests/generator_errors_and_warnings/test_invalid_unions.py

+7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ def warnings(self):
1818
UnionWithInvalidDefault:
1919
type: ["number", "integer"]
2020
default: aaa
21+
UnionWithMalformedVariant:
22+
anyOf:
23+
- type: string
24+
- type: array # invalid because no items
2125
"""
2226
)
2327

@@ -26,3 +30,6 @@ def test_invalid_reference(self, warnings):
2630

2731
def test_invalid_default(self, warnings):
2832
assert_bad_schema_warning(warnings, "UnionWithInvalidDefault", "Invalid int value: aaa")
33+
34+
def test_invalid_property(self, warnings):
35+
assert_bad_schema_warning(warnings, "UnionWithMalformedVariant", "Invalid property in union")

0 commit comments

Comments
 (0)