aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/flat-union-no-base.json
blob: 641f68aea46b5277f13dacbdfb921c4654426af6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# flat unions require a base
# TODO: simple unions should be able to use an enum discriminator

##
# @TestTypeA:
##
{ 'struct': 'TestTypeA',
  'data': { 'string': 'str' } }
##
# @TestTypeB:
##
{ 'struct': 'TestTypeB',
  'data': { 'integer': 'int' } }
##
# @Enum:
##
{ 'enum': 'Enum',
  'data': [ 'value1', 'value2' ] }
##
# @TestUnion:
##
{ 'union': 'TestUnion',
  'discriminator': 'Enum',
  'data': { 'value1': 'TestTypeA',
            'value2': 'TestTypeB' } }