aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/flat-union-inline.json
blob: 400f0817a18a5e38aadd3beb306e4d47be74d33c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# we require branches to be a struct name
# TODO: should we allow anonymous inline branch types?

##
# @TestEnum:
##
{ 'enum': 'TestEnum',
  'data': [ 'value1', 'value2' ] }
##
# @Base:
##
{ 'struct': 'Base',
  'data': { 'enum1': 'TestEnum', 'kind': 'str' } }
##
# @TestUnion:
##
{ 'union': 'TestUnion',
  'base': 'Base',
  'discriminator': 'enum1',
  'data': { 'value1': { 'string': 'str' },
            'value2': { 'integer': 'int' } } }