]> git.proxmox.com Git - mirror_qemu.git/blob - tests/qapi-schema/flat-union-no-base.json
641f68aea46b5277f13dacbdfb921c4654426af6
[mirror_qemu.git] / tests / qapi-schema / flat-union-no-base.json
1 # flat unions require a base
2 # TODO: simple unions should be able to use an enum discriminator
3
4 ##
5 # @TestTypeA:
6 ##
7 { 'struct': 'TestTypeA',
8 'data': { 'string': 'str' } }
9 ##
10 # @TestTypeB:
11 ##
12 { 'struct': 'TestTypeB',
13 'data': { 'integer': 'int' } }
14 ##
15 # @Enum:
16 ##
17 { 'enum': 'Enum',
18 'data': [ 'value1', 'value2' ] }
19 ##
20 # @TestUnion:
21 ##
22 { 'union': 'TestUnion',
23 'discriminator': 'Enum',
24 'data': { 'value1': 'TestTypeA',
25 'value2': 'TestTypeB' } }