aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/flat-union-bad-discriminator.json
blob: 1599a5945443417a236510b16eba321e2f3d6257 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# FIXME: we should require the discriminator to be a string naming a base-type member
{ 'enum': 'TestEnum',
  'data': [ 'value1', 'value2' ] }
{ 'type': 'TestBase',
  'data': { 'enum1': 'TestEnum', 'kind': 'str' } }
{ 'type': 'TestTypeA',
  'data': { 'string': 'str' } }
{ 'type': 'TestTypeB',
  'data': { 'integer': 'int' } }
{ 'union': 'TestUnion',
  'base': 'TestBase',
  'discriminator': [],
  'data': { 'kind1': 'TestTypeA',
            'kind2': 'TestTypeB' } }