qapi: add qapi2texi script
[qemu/ar7.git] / tests / qapi-schema / flat-union-no-base.json
blob641f68aea46b5277f13dacbdfb921c4654426af6
1 # flat unions require a base
2 # TODO: simple unions should be able to use an enum discriminator
4 ##
5 # @TestTypeA:
6 ##
7 { 'struct': 'TestTypeA',
8   'data': { 'string': 'str' } }
9 ##
10 # @TestTypeB:
12 { 'struct': 'TestTypeB',
13   'data': { 'integer': 'int' } }
15 # @Enum:
17 { 'enum': 'Enum',
18   'data': [ 'value1', 'value2' ] }
20 # @TestUnion:
22 { 'union': 'TestUnion',
23   'discriminator': 'Enum',
24   'data': { 'value1': 'TestTypeA',
25             'value2': 'TestTypeB' } }