Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
[qemu/ar7.git] / tests / qapi-schema / flat-union-base-union.json
blob98b4eba181e4426b32728b0916d2175184d89db3
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 { 'enum': 'TestEnum',
6   'data': [ 'value1', 'value2' ] }
7 { 'struct': 'TestTypeA',
8   'data': { 'string': 'str' } }
9 { 'struct': 'TestTypeB',
10   'data': { 'integer': 'int' } }
11 { 'union': 'UnionBase',
12   'data': { 'kind1': 'TestTypeA',
13             'kind2': 'TestTypeB' } }
14 { 'union': 'TestUnion',
15   'base': 'UnionBase',
16   'discriminator': 'type',
17   'data': { 'kind1': 'TestTypeA',
18             'kind2': 'TestTypeB' } }