repo.or.cz
/
qemu
/
ar7.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
qapi: add qapi2texi script
[qemu/ar7.git]
/
tests
/
qapi-schema
/
flat-union-optional-discriminator.json
blob
9f19af5789a5ac831f6e520df76e30960dda6832
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' } }