aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/flat-union-bad-base.json
blob: 7713e7f0adc65c502597c834acf405d4c218d737 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# we allow anonymous base, but enforce no duplicate keys

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