]> Git Repo - qemu.git/blob - tests/qapi-schema/flat-union-optional-discriminator.json
qapi: add qapi2texi script
[qemu.git] / tests / qapi-schema / flat-union-optional-discriminator.json
1 # we require the discriminator to be non-optional
2
3 ##
4 # @Enum:
5 ##
6 { 'enum': 'Enum', 'data': [ 'one', 'two' ] }
7 ##
8 # @Base:
9 ##
10 { 'struct': 'Base',
11   'data': { '*switch': 'Enum' } }
12 ##
13 # @Branch:
14 ##
15 { 'struct': 'Branch', 'data': { 'name': 'str' } }
16 ##
17 # @MyUnion:
18 ##
19 { 'union': 'MyUnion',
20   'base': 'Base',
21   'discriminator': '*switch',
22   'data': { 'one': 'Branch',
23             'two': 'Branch' } }
This page took 0.0273 seconds and 4 git commands to generate.