]> git.proxmox.com Git - mirror_qemu.git/blob - tests/qapi-schema/flat-union-base-union.json
c63c6130b8f2b0f3f5dc62837a13008b8429b0a6
[mirror_qemu.git] / tests / qapi-schema / flat-union-base-union.json
1 # For now, we require the base to be a struct without variants
2 # TODO: It would be possible to allow a union as a base, as long as all
3 # permutations of QMP names exposed by base do not clash with any QMP
4 # member names added by local variants.
5
6 ##
7 # @TestEnum:
8 ##
9 { 'enum': 'TestEnum',
10 'data': [ 'value1', 'value2' ] }
11 ##
12 # @TestTypeA:
13 ##
14 { 'struct': 'TestTypeA',
15 'data': { 'string': 'str' } }
16 ##
17 # @TestTypeB:
18 ##
19 { 'struct': 'TestTypeB',
20 'data': { 'integer': 'int' } }
21 ##
22 # @UnionBase:
23 ##
24 { 'union': 'UnionBase',
25 'data': { 'kind1': 'TestTypeA',
26 'kind2': 'TestTypeB' } }
27 ##
28 # @TestUnion:
29 ##
30 { 'union': 'TestUnion',
31 'base': 'UnionBase',
32 'discriminator': 'type',
33 'data': { 'kind1': 'TestTypeA',
34 'kind2': 'TestTypeB' } }