aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/flat-union-bad-base.json
blob: d41c80c3bdc84928c4699aeaf4c9b79d04677558 (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' ] }
{ 'type': 'TestTypeA',
  'data': { 'string': 'str' } }
{ 'type': 'TestTypeB',
  'data': { 'integer': 'int' } }
{ 'union': 'TestUnion',
  'base': { 'enum1': 'TestEnum', 'kind': 'str' },
  'discriminator': 'enum1',
  'data': { 'value1': 'TestTypeA',
            'value2': 'TestTypeB' } }