aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/union-invalid-union-subfield.json
blob: e1639d3a963171cb4512977190d478cc92f083e9 (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
26
27
28
29
30
# Clash between common member and union variant's variant member
# Base's member 'teeth' clashes with TestTypeFish's

{ 'enum': 'TestEnum',
  'data': [ 'animals', 'plants' ] }

{ 'enum': 'TestAnimals',
  'data': [ 'fish', 'birds'] }

{ 'struct': 'TestTypeFish',
  'data': { 'scales': 'int', 'teeth': 'int' } }

{ 'struct': 'TestTypeBirds',
  'data': { 'feathers': 'int' } }

{ 'union': 'TestTypeAnimals',
  'base': { 'atype': 'TestAnimals' },
  'discriminator': 'atype',
  'data': { 'fish': 'TestTypeFish',
            'birds': 'TestTypeBirds' } }

{ 'struct': 'TestTypePlants',
  'data': { 'integer': 'int' } }

{ 'union': 'TestUnion',
  'base': { 'type': 'TestEnum',
            'teeth': 'int' },
  'discriminator': 'type',
  'data': { 'animals': 'TestTypeAnimals',
            'plants': 'TestTypePlants' } }