qapi: add qapi2texi script
[qemu/ar7.git] / tests / qapi-schema / flat-union-optional-discriminator.json
blob9f19af5789a5ac831f6e520df76e30960dda6832
1 # we require the discriminator to be non-optional
3 ##
4 # @Enum:
5 ##
6 { 'enum': 'Enum', 'data': [ 'one', 'two' ] }
7 ##
8 # @Base:
9 ##
10 { 'struct': 'Base',
11   'data': { '*switch': 'Enum' } }
13 # @Branch:
15 { 'struct': 'Branch', 'data': { 'name': 'str' } }
17 # @MyUnion:
19 { 'union': 'MyUnion',
20   'base': 'Base',
21   'discriminator': '*switch',
22   'data': { 'one': 'Branch',
23             'two': 'Branch' } }