aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/flat-union-bad-base.json
blob: e2e622bb6e00cd0384a1ec54fdbdbd51d6871030 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# we require the base to be an existing struct
# TODO: should we allow an anonymous inline base type?
{ 'enum': 'TestEnum',
  'data': [ 'value1', 'value2' ] }
{ 'struct': 'TestTypeA',
  'data': { 'string': 'str' } }
{ 'struct': 'TestTypeB',
  'data': { 'integer': 'int' } }
{ 'union': 'TestUnion',
  'base': { 'enum1': 'TestEnum', 'kind': 'str' },
  'discriminator': 'enum1',
  'data': { 'value1': 'TestTypeA',
            'value2': 'TestTypeB' } }