summaryrefslogtreecommitdiffstats
path: root/tests/qapi-schema/flat-union-inline.json
blob: 62c7cda61750fa72701a3d6b2f626a65d9064d5a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
# we require branches to be a struct name
# TODO: should we allow anonymous inline branch types?
{ 'enum': 'TestEnum',
  'data': [ 'value1', 'value2' ] }
{ 'struct': 'Base',
  'data': { 'enum1': 'TestEnum', 'kind': 'str' } }
{ 'union': 'TestUnion',
  'base': 'Base',
  'discriminator': 'enum1',
  'data': { 'value1': { 'string': 'str' },
            'value2': { 'integer': 'int' } } }