aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/flat-union-optional-discriminator.json
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qapi-schema/flat-union-optional-discriminator.json')
-rw-r--r--tests/qapi-schema/flat-union-optional-discriminator.json10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/qapi-schema/flat-union-optional-discriminator.json b/tests/qapi-schema/flat-union-optional-discriminator.json
new file mode 100644
index 0000000000..ece0d31fb3
--- /dev/null
+++ b/tests/qapi-schema/flat-union-optional-discriminator.json
@@ -0,0 +1,10 @@
+# FIXME: we should require the discriminator to be non-optional
+{ 'enum': 'Enum', 'data': [ 'one', 'two' ] }
+{ 'type': 'Base',
+ 'data': { '*switch': 'Enum' } }
+{ 'type': 'Branch', 'data': { 'name': 'str' } }
+{ 'union': 'MyUnion',
+ 'base': 'Base',
+ 'discriminator': '*switch',
+ 'data': { 'one': 'Branch',
+ 'two': 'Branch' } }